Hello,
I'm running into an issue when trying to save the current map viewpoint only after a user interaction.
I've implemented viewpointChangedHandler, however, that method is called also when the map is programatically setup (e.g. at start up).
To avoid saving a map position that wasn't set by the user, I'm also checking that isNavigating == true, however that doesn't seem to be enough. It seems that isNavigating might be true/false in other situations as well.
Logs from my tests:
// Loading map (with viewpoint set to 37.926438,-122.070035,0.004000,0.006430,0.000000)
18:28:37:196 isNavigating: true viewpoint: -0.000000,0.000000,160.809973,360.000000,0.000000
18:28:37:228 isNavigating: true viewpoint: 0.000052,-0.000931,160.798596,359.913489,0.000000
18:28:37:450 isNavigating: false viewpoint: 37.926438,-122.070035,0.004000,0.006430,0.000000
// Rotating map, pan, zoom
18:29:40:253 isNavigating: true viewpoint: 37.926362,-122.070321,0.002501,0.004020,79.688963
18:29:40:570 isNavigating: true viewpoint: 37.926356,-122.070335,0.002631,0.004229,83.738892
18:29:40:821 isNavigating: true viewpoint: 37.926357,-122.070380,0.002793,0.004489,97.041926
18:29:41:040 isNavigating: false viewpoint: 37.926358,-122.070381,0.002793,0.004489,97.376031
18:29:43:911 isNavigating: true viewpoint: 37.926354,-122.070384,0.002873,0.004618,97.376031
I found this thread for the old SDK notification when user moves map, that can be combined with lastChangeFromInteraction, but I can't find something similar in SDK 100.6.
What's the most reliable way to save the viewpoint after a user interaction?
Thank you,
Marius