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

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

SOLVED
Highlighted
Newbie

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 ACCEPTED SOLUTION

Accepted Solutions

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

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.

View solution in original post

16 REPLIES 16

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

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

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

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.

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

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.

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

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.

View solution in original post

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

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

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

Hi Ankit,

Yes I have enabled the tooltip option but nothing shows.

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

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

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

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.

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

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.

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________