Pass Parameters to Web App via URL

348
1
11-22-2022 11:01 PM
ItsRoundWeChecked
New Contributor

I'm trying to speed up my own process of using this tool by the USGS to locate topo quads for work. In the process, I'd like to pass a location to the app via the url. I understand the syntax of baseurl?parameter=value, but I can not for the life of me find out what parameter to enter in. I've tried "geocoder" and variations to no avail.

App link: https://livingatlas.arcgis.com/topoexplorer/

Tags (2)
1 Reply
Stacey_Crowe
MVP

This might help you.  

I wrote this up for one AGOL Web App designers a few years ago.

It is possible to create a single web app in AGOL or Portal and use the URL Parameters to control the center point, extent, zoom level of the map by the URL parameters.  You can also control many other parameters for embedded maps such as map navigation and visibility of mapping elements.  This quite useful when embedding a web maps / web apps in a webpage page or you want to provide different https links to GIS User base on their location.

The best ESRI documentation page I know is for embed Web Map and URL Parameters is  https://doc.arcgis.com/en/arcgis-online/reference/embed-map-parameters.htm

Currently only available in Web Map Classic

This ESRI web page talks about Web Map but I have also used it on Web App (web app builder).

My Favorite two URL parameters are 

  • center—Centers the map using geographic coordinates (x,y).
  • level—The level ID of the cached scale as listed in the REST endpoint of the basemap. This determines the default zoom level when the map loads, for example, level=9.
    • example of a ESRI basemap where you can see the list of levels at the REST endpoint

&center=-112.074,33.433&level=10

There is also extend URL parameter by using the four corners, example (&extent=-86.179,39.923,-85.932,40.075). But I think using the basemap levels is easier.

  • extent—Specifies the extent to be used when the map loads. This overrides the map’s default extent. Only geographic coordinate system values are valid.