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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to set multiple marker in google Map in Mashup ?

mpatel-21
12-Amethyst

How to set multiple marker in google Map in Mashup ?

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

ACCEPTED SOLUTION

Accepted Solutions
mpatel-21
12-Amethyst
(To:PaiChung)

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

View solution in original post

2 REPLIES 2
PaiChung
22-Sapphire I
(To:mpatel-21)

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-21
12-Amethyst
(To:PaiChung)

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

Announcements


Top Tags