[Solved] how to add a marker after I Auto zoom on the current location on google map

Hello
I can’t find the solution for auto scaling the map on my current position.
I get lat and long with the sensor locator but when I put these paremeters in the set(Map) position, the screen doesn’t show the position… and the first screen on the map is always on the same position…
Can I refresh the map to the new position automatically ??

the test


the map (always the same)

my position (i need to move on the screen to see it)

The addmarker block is going to fire immediately after the GetCurrentLocation block starts. Not when it finishes… when it starts. The timing is going to be off. Also, more importantly, green blocks only have values within the function they are attached to. So outside of the GetCurrentLocation block, they won’t have any values and will be null.

This should have a simple fix: move the addMarker block into the then do section of the GetCurrentLocation block so that it forces it to fire after the GetCurrentLocation block populates the green blocks with values.

4 Likes

Hello
Thank you… It works well. I thought that the variables will help me to keep the right values to use it after.
Grreeeaattt

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.