Sharing and Collaboration

Using URL Parameters In Web Apps

URL parameters are supported in the Basic Viewer, Map Tools, Legend, Simple Viewer, Time Aware, Directions, Elevations Profile, and Filter apps. These URL parameters allow you to override the default extent or enter a search term. The scale level, extent (geographic, not projected coordinates), center, and find URL parameters are supported for these apps.

To try this, open the following app with different URL parameters and notice the different default extents:

http://www.arcgis.com/apps/Viewer/index.html

http://www.arcgis.com/apps/Viewer/index.html?extent=-117.20,34.055,-117.19,34.06

http://www.arcgis.com/apps/Viewer/index.html?center=20,45

http://www.arcgis.com/apps/Viewer/index.html?level=12

http://www.arcgis.com/apps/Viewer/index.html?center=20,45&level=12

http://www.arcgis.com/apps/Viewer/index.html?find=redlands%20california

 

Custom URL Parameters:

In addition to the supported URL parameters, you can create your own custom URL parameter that zooms in on and shows the pop-up for a feature when the app opens. This feature is supported in the Basic Viewer, Map Tools, and Simple Map Viewer and is set up the configuration panel. Once the parameter has been set up, you can specify which feature to display by adding &name=value  to your URL where name is the name you assign your parameter and value is the value of the feature.

To set this up:

  1. Enter a name for the parameter you want to create.
  2. Select the layer that contains the field for the parameter you are creating.
  3. Enter the search field that you want to search with your custom URL parameter.

See custom URL parameters in use by opening the following links or by appending a new zipcode to the URL:

http://www.arcgis.com/apps/Viewer/index.html?appid=e59de8c32e0e4ffc8afc53cff18e7be1

http://www.arcgis.com/apps/Viewer/index.html?appid=e59de8c32e0e4ffc8afc53cff18e7be1&zipcode=92373

Written by Chris Fitzpatrick, configurable apps intern.

Next Article

Be somebody (and show your best profile)

Read this article