Open VertiGIS Studio Web at previous extent without having to save a project
RéponduImplementing browser cookies to save the extent of the map every time it changes would enhance the user experience of VertiGIS Studio Web. When a user opens the map again, it should zoom to this extent. Having to save a project “manually” these days seems a bit old fashioned, especially if the only needs are preservation of extent.
Hope you could take a look at implementing this this.
-
Commentaire officiel
Hi Kristine,
This is possible today with a little bit of custom code. We can build off of the "Tap into a Web Event" sample found here https://vertigis-web-samples.netlify.app/tap-into-web-event.
All we need to do is set the extent into local storage every time the map moves (line 21 in our CustomService.ts) and add a command to be able to fetch that locally stored extent:

Then we set the map's "onInitialized" event to our "custom-service.set-initial-viewpoint" command (line 16 in the app.json)

Don't forget that our new command will need to be registered alongside the other custom commands!


-
It would be nice to have a way to Thumbs up in the Forums like for the above post and a way to save Tips entered in the forums.
1 -
Great, thank you very much for helping me out with this, @.... Much appreciated!
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
3 commentaires