Skip to main content
1-Visitor
February 8, 2016
Solved

How to set multiple marker in google Map in Mashup ?

  • February 8, 2016
  • 1 reply
  • 3539 views

Hello Expert,

I am working on one application whose tracking the location. I was stuck when assign a marker like this is  Home and this is Office in Thingworx Google Map.

Please give me answer for how can i assign marker i was try many things but does not reflect on Map.@

Thanks ,

Mayank

Best answer by mpatel-21

Thanks Chung,

I got my answer : Now it's solve my problem.

var params = {

    infoTableName : "InfoTable",

    dataShapeName : "Datasahpe"

};

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

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

// location:LOCATION

var location = new Object();

location.latitude = 23.452;

location.longitude = 72.124;

location.elevation = 0;

location.units = "WGS84";

result.AddRow({location:location})

//location:LOCATION2

var location2 = new Object();

location2.latitude = 23.123;

location2.longitude = 72.456

location2.elevation = 0;

location2.units = "WGS84";

result.AddRow({location:location2});

Thanks,

Mayank

1 reply

22-Sapphire I
February 9, 2016

Assign a table of information (infotable) with locations

one row would be Office and its location

one row would be home and its location

etc.

You can drag that directly onto the Google map, make sure you assign the proper field to the location property afterwards.

mpatel-211-VisitorAuthorAnswer
1-Visitor
February 9, 2016

Thanks Chung,

I got my answer : Now it's solve my problem.

var params = {

    infoTableName : "InfoTable",

    dataShapeName : "Datasahpe"

};

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

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

// location:LOCATION

var location = new Object();

location.latitude = 23.452;

location.longitude = 72.124;

location.elevation = 0;

location.units = "WGS84";

result.AddRow({location:location})

//location:LOCATION2

var location2 = new Object();

location2.latitude = 23.123;

location2.longitude = 72.456

location2.elevation = 0;

location2.units = "WGS84";

result.AddRow({location:location2});

Thanks,

Mayank