I need to place more markers every five seconds on Google Maps, but when I place a new marker on the map, the map is reset to default values, e.g. zoom, map scroll, rotation and more. I just need to update marker’s position or to add new one. But I want to save current map position, zoom and rotation. Thank you in advance!
Try to keep the coordinates and zoom level before the addition of markers and restore them after adding markers.
I’ve tried this way but it seems not working.
You need to store the data and re-set it after the marker was placed… what I did in an app of mine was setting the lat and lng to the coordinates of the just created marker immediately afterwards. Because else it would also jump back to the last set location of the map…
This Is what I’ve done as you can see in the picture attached to my previous post
but why wait 2 seconds? 2 seconds is hell of a time in that case… why not do it instantly? Does it still not work ? Because from the blocks I see I would assume it should… If it still does not then this might be a bug just like the webviewer does not return the current URL but rather the last one set
Exactely, I’ve inserted a 2 secs wait to see if It needs time to Place the marker or something similar 'cause without wait block the result Is the same.
It Always reset zoom factor to default value
Then unfortunately I think this is just like I assumed that the blocks return the last manually set value and not the last value of user interaction This would definitely be something that need improvement - also for the webview since currently “get URL” does not return the current URL but rather the last one you set…
Does anybody know if there might be a workaround by working with the objects block just like there is a workaround to be able to place a marker at all?
Does anybody know if there might be a workaround by working with the objects block
Unfortunately, I did not understand what kind of solution you are looking for and what does not work in object blocks
I meant if there might be some chance that there is an object property returning the current zoom, lng, lat just like there is one returning where the map is touched because then we could use that instead and „fix“ this issue for now.
Now I got it. Like you, I am surprised at the situation when the blocks return what was written to them earlier, rather than the current state and property values. Mark told me what they think about it, but a lot of time has passed, and the blocks have not learned how to return the current state. This really leads to the need to create crutches that do not match the user experience.