Why are URL parameters changing my web map?

1815
2
Jump to solution
05-11-2016 12:18 PM
MattKelso
New Contributor II

I am trying to modify functionality of a map through URL parameter arguments as specified on this page:

Use URL parameters to modify maps—ArcGIS Online Help | ArcGIS

When I try this on web mapping applications, I get a very curious and undesirable result.  Here is a test map of county and state boundaries:

http://ft.maps.arcgis.com/apps/Embed/index.html?appid=936f69916575499a96a329e1bac9162a

When I add any sort of URL parameters, the map will execute the parameter, but it will be on on a completely different web map.  For example:

http://ft.maps.arcgis.com/apps/Embed/index.html?appid=936f69916575499a96a329e1bac9162a?extent=-117.2...

You'll note that the appid is the same for both maps and it zooms into the proper location, however the basemap and the content are completely different.   This is the case no matter which URL parameter arguments I use.

Any help  on this would be most appreciated!

0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

The problem is that in your second app you are adding the extent url parameter using ? but its the second url param so you'll need to switch it to & instead. Here's the updated link:

http://ft.maps.arcgis.com/apps/Embed/index.html?appid=936f69916575499a96a329e1bac9162a&extent=-117.2...

When the ? was there the application was looking for an appid that was equal to the appid value plus the extent and wasn't finding a valid appid so it fell back to the default web map associated with the application.

View solution in original post

2 Replies
KellyHutchins
Esri Frequent Contributor

The problem is that in your second app you are adding the extent url parameter using ? but its the second url param so you'll need to switch it to & instead. Here's the updated link:

http://ft.maps.arcgis.com/apps/Embed/index.html?appid=936f69916575499a96a329e1bac9162a&extent=-117.2...

When the ? was there the application was looking for an appid that was equal to the appid value plus the extent and wasn't finding a valid appid so it fell back to the default web map associated with the application.

MattKelso
New Contributor II

Thank you!

0 Kudos