Zoom scale in URL?

8571
8
06-17-2016 08:23 AM
helenchu
Occasional Contributor II

Set zoom scale in URL

I pass extent value when opening my web appbuilder.  I'd like to have zoom scale also but "&scale = ###" doesn't work. What else do I need to do ?

Thanks for your help.

http://localhost/webappbuilder/apps/8/?extent=3021645.759055,13903254.465970,3029741.267142,13921129...

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus

Helen,


   If you are using extent in the url there is no need to use scale, that is why it is ignored. The extent provides all that is needed to set the map to a specific location and scale.

helenchu
Occasional Contributor II

Thanks Robert.  The extent was set from another app (workflow manager) and it's not zoomed in close enough for what I need.

If that's the case I would have pass other values to my url.  How about query?

http://localhost/webappbuilder/apps/8/?query=???

I have many layers, no sub layers.  If I need to pass a layer id in the URL, how do I find layer id ?

Many thanks.

Edit: I got the URL works!  I do not need Layer id for my URL in this case.  However I still do not know how to get to the webmap json.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Helen,

See this link for all URL parameters and how to use then:

Use URL parameters—Web AppBuilder for ArcGIS | ArcGIS

I would suggest using the Center and Scale parameters then if the extent from workflow manger is not zoomed in enough.

helenchu
Occasional Contributor II

Thank you very much Robert

0 Kudos
JavierPablos1
New Contributor III

Hello,

I am experiencing a extrange behaviour when using center and scale. When accesing the following URL in differente browsers I am getting different scales (In IE scale=7486, Firefox scale=7000 and chrome scale=8088)

https://sigp.chcantabrico.es/sigweb/index.html?center=268719,4805493,25830&scale=7000

Anybody knows why this is happening? Basemaps are not cached.Robert Scheitlin, GISP?

Thanks in advance

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Javier,

   In Chrome I get 7000, but if I have the browsers zoom set to anything besides 100% then the scale is off. Could that be your issue?

0 Kudos
JavierPablos1
New Contributor III

Hi Robert, 

Thanks for your answer. I don´t think that is the issue. I am trying in chrome with 100% and still getting a different scale than 7000 which is the value stated in the parameter.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Javier,

   Very strange. This is what I am getting in Chrome using your site.

0 Kudos