Skip to main content
1-Visitor
Jan 20, 2017 5:09 AM UTC
Solved

How to display the location of multiple objects on a google map and on clicking one object we get its location details.

we want to display the location of multiple objects on a google map at the same time and on clicking one marker we should get complete location details of that object.

1-Visitor
Jan 30, 2017 12:08 PM UTC

Hello Priyanshi,

1. The easiest way.

​If your service that populates the Google Map returns also the additional attributes that should be shown when marker is selected, you can bind the SelectedRows of your service with the grid - this way, when you select the marker, a whole data regarding selected record will be passed to the grid:

2. The more flexible way.

If you don't have the data as an result of the same service or don't want to use the previous way, you can pass the selected location parameter to additional service that returns more data:

Hope that clarifies a little bit. In case of any questions, don't hesitate to ask.

Regards,

J.

16 replies

1-Visitor
Jan 20, 2017 8:20 AM UTC

Use Google Maps widget that's on the marketplace: https://marketplace.thingworx.com/Items/google-widgets

Translate
1-Visitor
Jan 20, 2017 8:33 AM UTC

Hello Priyanshi Saxena​,

You can use Google Map widget. It's easy. Just need to pass an infotable with at least one Location type field to the Data field and then pick this field in the LocationField widget property. Don't forget to mark true ShowMarkers property (but don't worry, it's true by default).

Hope it helps, let me know if you need any additional questions.

Regards,

J.

Translate
psaxena1-VisitorAuthor
1-Visitor
Jan 30, 2017 11:08 AM UTC

Hi Jakub,

Yes it worked, I am able to display multiple locations but how to display the data associated with those locations in the infotable (i.e other fields in the infotable) on selecting any marker on the map.

Translate
1-Visitor
Jan 30, 2017 12:08 PM UTC

Hello Priyanshi,

1. The easiest way.

​If your service that populates the Google Map returns also the additional attributes that should be shown when marker is selected, you can bind the SelectedRows of your service with the grid - this way, when you select the marker, a whole data regarding selected record will be passed to the grid:

2. The more flexible way.

If you don't have the data as an result of the same service or don't want to use the previous way, you can pass the selected location parameter to additional service that returns more data:

Hope that clarifies a little bit. In case of any questions, don't hesitate to ask.

Regards,

J.

Translate
5-Regular Member
Jan 30, 2017 12:32 PM UTC

Priyanshi Saxena​ I think you would require to use Tooltip option for that.

Translate
psaxena1-VisitorAuthor
1-Visitor
Jan 31, 2017 5:42 AM UTC

Hi Ankit,

Yes I have enabled the tooltip option but nothing shows.

Translate
5-Regular Member
Jan 31, 2017 6:55 AM UTC

Hi Priyanshi Saxena​,

It works fine for me. I passed all data (Location, Tooltip details) as data to Google Map. Then selected my LocationField and TooltipField properties from the dropdown and it shows data as expected.

What are the exact steps that you are following.

Capture.JPG

Thanks,

Ankit Gupta

Translate
1-Visitor
Jun 19, 2017 2:05 AM UTC

HI Jakub Kaczynski​, Hope you are doing well.I have question please.

i have used info-table to present multiple locations, each location point has some few properties that i could manage to show once the location point is clicked
Now, i need to present infotable as one of the data presented on each location point, so infotable within infotable, but actually data is shown in below format

it shows [object Object] instead of showing the content of info table, could you please assist

Translate