Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hello Everyone ,
Most of the developer are confused in add Multiple marker in Map.
Follow the steps to solve the issue .
Step 1 : Create Data Shape for you put information in Marker like Location or Tool tip.
Step 2: Add Service in your Things , Things Template
Step 3: As output Type Select Info table and Select Data Shape you created for return type.
Step 4 : Put Bellow code in your JavaScript Box :
var params = {
infoTableName : "InfoTable",
dataShapeName : "Datasahpe"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(Datasahpe)
var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
// location:Home LOCATION
var location = new Object();
location.latitude = 23.452;
location.longitude = 72.124;
location.elevation = 0;
location.units = "WGS84";
result.AddRow({location:location})
//location :Office LOCATION2
var location2 = new Object();
location2.latitude = 23.123;
location2.longitude = 72.456
location2.elevation = 0;
location2.units = "WGS84";
result.AddRow({location:location2});
Step 5: Execute the service you get result.
Step 6: Drag the service in your Mashup Map and Select Data.
Thanks,
Mayank