[Google Maps Mobile]  How do I get information from a bookmark and display it on the screen? Maps Mobile

[Google Maps Mobile]  How do I get information from a bookmark and display it on the screen? Maps Mobile

  
Forge Component
(6)
Published on 21 Jul by OutSystems Labs
6 votes
Published on 21 Jul by OutSystems Labs


I've created a list of bullet points, and I've put it on the screen




I created the click action above the marker



In action, how will I know which bookmark the user clicked on?

In the makerId, comes a very strange number, and how I search for that id.

Solution

Hi Cleber,

The MarkerId is generated by the component, but you have the MarkerListIndex, which returns the index of the list.

What you probably want is: GetRota113s[MarkerListIndex].Record to retrieve the record that matches the map marker clicked. 

Let me know if it worked.


Cheers,

Henrique


Solution

Hi Henrique, thank you very much, with your suggestion I was able to solve my problem.

I wonder if you know how to route routes in the maps? For example, showing the path from one point to another. And how to calculate the distance to know the shortest distance?

Thanks


Henrique Batista wrote:

Hi Cleber,

The MarkerId is generated by the component, but you have the MarkerListIndex, which returns the index of the list.

What you probably want is: GetRota113s[MarkerListIndex].Record to retrieve the record that matches the map marker clicked. 

Let me know if it worked.


Cheers,

Henrique





Hi Cleber,


About the routes, are you talking about directions or is something different?

About the distance, I don't know if google provides a service to calculate the distance between to points. If the distance is on a rect line you can always use the Haversine formula (see an example of the implementation here).

PS: If it solved the problem can you mark my answer as the correct one, thanks.


Cheers,

Henrique