Select to view content in your preferred language

Set different extents for one map embedded in multiple web pages

958
4
11-21-2011 03:07 AM
ScotlandLandscapes
New Contributor
Hi, I have a map that I'd like to embed on multiple web pages (map of photos, different extent on each photo web page). I know how to set the default extent of the map and how to set a map extent in a link using URL parameters but have trouble with this for an embedded map. For example embedding the following code leads to the embedded map using the map default extent but when accessed using the "view larger map" link the specified center and level are recognised and used correctly.

<iframe width="850" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.arcgis.com/home/webmap/embedViewer.html?webmap=b49ad2c276e04c9bb2bf350090c36d8e&center=-4..."></iframe><br /><small><a href="http://www.arcgis.com/home/webmap/viewer.html?webmap=b49ad2c276e04c9bb2bf350090c36d8e&center=-4.1,58..." style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a></small>

Thanks

Jason
www.scotland-landscapes.com
Tags (2)
0 Kudos
4 Replies
MikeMinami
Esri Notable Contributor
Yes you can. You can modify the 'center' and 'level' parameters or you could use an 'extent' parameter. Below, I've changed the extent of the map.

<iframe width="850" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.arcgis.com/home/webmap/embedViewer.html?webmap=b49ad2c276e04c9bb2bf350090c36d8e&extent=-122.6878,30.9819,-113.1956,38.1385"></iframe><br /><small><a href="http://www.arcgis.com/home/webmap/viewer.html?webmap=b49ad2c276e04c9bb2bf350090c36d8e&extent=-122.6878,30.9819,-113.1956,38.1385" style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a></small>


Thanks,

Mike
0 Kudos
ScotlandLandscapes
New Contributor
Thanks Mike, I couldn't and can't make the center and level commands work for the embedded map for whatever reason, but the extent does the job.

Cheers

Jason
0 Kudos
RandyKreuziger
Frequent Contributor
Mike, I'd like to do that same thing but for 100 different web pages.  Each page represents 1 water access site.  Will there ever be an option to select the center based on a definition query?  Like  [site] = '137'

Thanks
0 Kudos
MikeMinami
Esri Notable Contributor
Randy,

It's pretty unlikely that we'd do that as a URL parameter. I suspect it would be rather slow to open a map, as we'd have to send a query to the server to retrieve a value, extract it's extent, then center the map.

Thanks,

Mike
0 Kudos