cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to mark multiple plots in Google Maps?

pr-21
1-Newbie

How to mark multiple plots in Google Maps?

Hi,

For my project, I want to add multiple plots in the Google Map. I have read somewhere to add infotable in the service. But what code I can use it there ?

Please help me

2 REPLIES 2
qn
1-Newbie
1-Newbie
(To:pr-21)

Hi,

If your things have a location property, in a mashup, you can add a service which returns the list of things with their data, for example, GetImplementingThingsWithData. You can bind the result AllData of this service to Data of the GoogleMap widget. In the Location property of the GoogleMap, you chose the Thing's property which is the location. So, all the location will be marked on the map.

Similar posts:

Google Maps: tutorial

Displaying Multiple Locations in Google Map

Hello ,

Please follow the code for Multiple marker in Map.

In your service add result filed as Info table and add  filed you require.

var params = {

    infoTableName : "InfoTable",

    dataShapeName : "Datashape"

};

// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(Datashape)

var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);

// location:LOCATION

var location = new Object();

location.latitude = 42.452;

location.longitude = -72.124;

location.elevation = 0;

location.units = "WGS84";

result.AddRow({location:location})   // You can Add multiple marker using Add row.

Thanks ,

Mayank

Top Tags