This gist is an example of how to change the ArcGIS Flex viewer to accept query string parameters and initialize the map accordingly. It checks for "ll" and "z" query string parameters (e.g. "?ll=-99.3489,38.6983&z=11"), parses them, and reprojects the coordinates.
The getQueryParams()
function should be generic enough to use for other purposes, and the changes to map_loadHandler()
should provide some guidance for handling its results in practice.
- Example that this one is built from: https://geonet.esri.com/message/169604#169604
- Example that the query string parameter parsing is based on: http://www.summus.io/web-development/access-query-string-arguments-as3/
- Place in Esri's ArcGIS Flex viewer where this code should go: https://github.com/Esri/arcgis-viewer-flex/blob/develop/src/com/esri/viewer/managers/MapManager.mxml#L405