Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
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.
Solved! Go to Solution.
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.
Use Google Maps widget that's on the marketplace: https://marketplace.thingworx.com/Items/google-widgets
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.
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.
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.
Hi Ankit,
Yes I have enabled the tooltip option but nothing shows.
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.
Thanks,
Ankit Gupta
Hi Ankit,
I have a thing which has 3 properties
1. LocationDetails(infotable which has coordinates of latitude and longitude)
2. Username(String)
3. Address(String)
In my mashup I have used the service getProertyValues and binded the all data of this dervice to the data of google map.
In the LocationField dropdown I get the option of my LocationDetails infotable and in the tooltipField dropdown I get no option.
I want the username and address to be displayed as tooltip.
Priyanshi Saxena, So yo want to show same Tooltip detail for all locations? You can try binding the individual property directly to corresponding Tooltip field.
Hi Ankit,
No I want the tooltip for that particular location(Different for every location) i.e for every location coordinates in the LocationDetails infotable there will be details corresponding to that which will act as tooltip.
Hi Priyanshi,
Above is my previous answer that shows how to do that using SelectedRow and another service. Have you tried it before?
Hi Jakub,
Yes I did try with the Selected Rows method but still its not working.
Moreover I don't want to display the details in the grid, rather I want it as tool tip in the map itself.
Hi,
You're using GetPropertyValues OOTB service? In that case you can't do that, because this service doesn't have the DataShape on the output InfoTable. And if there's no DataShape on the result InfoTable, the Mashup Builder cannot "see" those fields. In your situation the best would be to create a custom service that would return all necessary properties as an InfoTable - but remember to create the DataShape with appropriate fields and set it as output InfoTable DataShape.
Regards,
J.
Hi Jakub,
Yes I am now able to display the details using my own customized service.
Thank you Ankit Gupta and Jakub Kaczynski
Priyanshi Saxena, That's Great! Could you please mark the correct answer and update helpful comments so that other community member know this Thread has a solution and which comments helped you resolve it.
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