cooke

Control initial extent in Basic Viewer template with URL parameters?

Discussion created by cooke on Nov 25, 2012
Latest reply on Nov 26, 2012 by mminami-esristaff
Have created and downloaded an app using the basicViewer template. It will be hosted on our own website so that we can further customize some of the colors and toolbars. Here's a link to one version of a crude mock-up of what we're working on.

Am wondering if there is a way to control the initial extent of the map using url parameters? We are working on a recreation guide, and would like to be able to embed this map on multiple "park" pages each describing one park, with the map zoomed and centered to the particular park on each page.

Have found examples of how to do this in other posts when using a simple api map, but these don't seem to work with the template.

Have the impression that the key to this is in the layout.js file that comes with the template. Even have the impression that the template might already do this using max and min coordinates in the url (though I don't seem to be able to make it work!). In an ideal world, I would like to be able to do this using url parameters for center and zoom level as in the post referenced above rather than the max and min coordinates.

Would be grateful for any advice!

Outcomes