How to Center a Web Map App built from template and hosted in AGOL

741
2
05-20-2013 03:51 PM
DianaUmpierre
New Contributor II
I have web map and created a web map app using the one pane template. I'm hosting it externally via AGOL.

One of the users wants to call this web map app from other website. The issue is that they want to pass an xy coordinate so that the web map app in AGOL automatically centers the map using the xy coord they specify. I have no clue how to do that within the web map app since I'm just using the one pane template.
Tags (2)
0 Kudos
2 Replies
TimWitt
Frequent Contributor
Hey Diana,

To adjust the extent in your application, you need to adjust the extent in your AGOL.

You can do that by moving the map to the place you would like it to be or you can manipulate the URL and then save the map again.

At the end of your URL it should look something like this:   &extent=-81.1979,28.0878,-80.0484,28.5791 where the bold part is your extent.

If your map doesnt have this, you can add it at the end of your URL.

Also check out this blog! http://blogs.esri.com/esri/arcgis/2011/11/11/adding-url-location-parameters-for-sharing-arcgis-onlin...

Hope this helps!
0 Kudos
DianaUmpierre
New Contributor II
Thanks Tim,

Your suggestion is good except that on my end I'm sharing the web app via an AGOL template web map app.

http://bcgis.maps.arcgis.com/home/webmap/viewer.html?webmap=___&center=-80.153503,26.070546&level=14
Above would work, but what I want is to pass a parameter via the app, like below. But the url parameters below won't work.
http://bcgis.maps.arcgis.com/apps/OnePane/basicviewer/index.html?appid=___&center=-80.153503,26.070546&level=14

There's something else I wonder if I can use. If I make the app configurable. But, I can't figure out how to write a configuration parameters to do what I want.  Any ideas??
http://resources.arcgis.com/en/help/arcgisonline/index.html#/Adding_configurable_parameters_to_templ...
0 Kudos