get map extent to open second studio web app
Since I am rather new to Vertigis I come here for help.
I want to add a command to open a second, different, studio web app with the same extent of the web app that I am using. No need to get current layers, only the extent.
Can I make a command in studio web or do I need a workflow? I can't find any examples online.
gr
Amelie
-
I think you need a workflow.
There is no extent URL parameter, so I think you will have to use the scale and center parmeters.
With a Get Map activity in a workflow, you should with expressions like =$map1.map.getCenter and =$map1.map.getScale be able to get the center and scale.
With a system.open-url command in a Run Command activity with parameters added to the URL you would be able to open the second app.
https://developers.vertigisstudio.com/docs/web/api-commands-operations/#command-system.open-url
-1 -
Thank you for the quick response.
It does not work as expected with the Get Map activity so I have tried the Get Map Extent activity.
in the Run Command I have used this:

I am not used to programming so maybe I am doing it all wrong…
0 -
Look in this app https://apps.vertigisstudio.com/web/?app=7a3f3740e2074ad88983e17521f46de9 how the share link is formed (Toolbar > Share > Share Link
I think the Command Parameter should be an expression like this
="https://yourserver.com/web/?app=xxxxxxxx¢er-xxx=" + $mapExtent1.center.x.toString + "," + $mapExtent1.center.y.toString0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
3 commentaires