Skip to main content
1-Visitor
January 7, 2016
Question

How to mark multiple plots in Google Maps?

  • January 7, 2016
  • 2 replies
  • 2236 views

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

1-Visitor
January 7, 2016

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

1-Visitor
February 9, 2016

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