3
Views
0
Comments
[Google Maps] DirectionsObj null after navigate to a detail screen and back to map
Forge component by Labs
46
Published on 06 Aug 2019
Application Type
Mobile

Hello all!

We're using the Google Maps in our project and we're using the route plan and markers that are next to the route.


To achieve this, we have the event "DirectionsAdded" and have a assign in the client action to save the DirectionsObj output to a local variable (type object). With this object, we calculate the distances of the markers and only show the closest ones.


In each marker, we have an event that navigates to a detail screen. When we back to map, the map is already rendered with the route and markers. When I change the filters of markers, I can the same action that is related to the event DirectionsAdded and I know that the DirectionsObj in this case doesn't have the value. This is why I saved the Local previously, but this is the problem. When navigate to a detail screen and back to map, the local is null as well.


I tried use the JavaScript to get the Directions from the direction id without success.


Could you guys give any direction how to get the DirectionsObj that is rendered in the GMap?