Select to view content in your preferred language

Start flex map to zoom to an ID in the URL

2350
3
09-29-2014 09:05 AM
LesHampton
Deactivated User

I need to pass a parcel number to a Flex application and have the application zoom to the parcel specified in the URL

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Les,

   If you are talking about a Flex Viewer application than you can use the eSearch Widget for this:

http://www.arcgis.com/home/item.html?id=5d4995ccdb99429185dfd8d8fb2a513e

If you talking about a custom Flex API application then you will have to develop your own capability to do this using a QueryTask.

0 Kudos
ReneRubalcava
Honored Contributor

A good DIY solution is using the IBrowserManager interface.

Adobe Flex 4.6 * Using the BrowserManager

You may need to use setTimeout to wait for the map to load and all your layers. Something like this.

map.addEventListener(MapEvent.LOAD, function():void {

  setTimeout(function():void {

    bm = BrowserManager.getInstance();

    bm.init();

    var o:Object = URLUtil.stringToObject(bm.fragment);

    var type:String = String(o.view);

    if (type != "") {

      switchMap(views[type]); // I use it for custom views

    }

  }, 500)

});

0 Kudos
LesHampton
Deactivated User

Thank You, I will give the Suggestions a try

0 Kudos