Select to view content in your preferred language

Passing Parameter to Flex Viewer

18595
114
01-14-2011 03:46 AM
CurtNielsen
Occasional Contributor
I would like to pass a parameter, parcel id, to flex viewer and have the map pan to that location. I have modified the Search widget to use a layer that we can search by parcel ID. Just want the same capability if I pass a parameter, paracle ID, to http://mynode/FlexViewer. Maybe something like http://mynode/FlexViewer?request=widget&version=2.1&WidgetName=Search&ParcelID=1234

Thank you!
Tags (2)
0 Kudos
114 Replies
AshleyPeters
Frequent Contributor
I've gone through this thread and have made the changes to the mapmanager.mxml suggested by Robert and Nathan. But, I received several errors and think this may be due to the changes that have occurred since version 2.2/2.3. I'm currently using 2.6. What changes do I need to make to the mapmanager.mxml so I can pass an extent through a URL?

Thanks for your help!

Ashley
0 Kudos
BjornSvensson
Esri Regular Contributor
I'm currently using 2.6.


The last 2.x version was ArcGIS Viewer for Flex 2.5, are you sure you are using 2.6?

If you are using 2.5, you don't have to do anything in code.  It's already part of the core, for example:
http://help.arcgis.com/en/webapps/flexviewer/live/index.html?extent=9965000,-129000,14206000,2733000

See the doc at http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/Viewer_URL_parameters/01m3000000290000...
0 Kudos
AshleyPeters
Frequent Contributor
Oops, my mistake! Yes, 2.5. I didn't realize that was a built in capability. I was trying to make that much more difficult!
0 Kudos
Erickson_Contract_Surveying_
Deactivated User
Oops, my mistake! Yes, 2.5. I didn't realize that was a built in capability. I was trying to make that much more difficult!


Has anyone compiled this for 3.2 and above?
0 Kudos
Noah-Sager
Esri Regular Contributor
Should work the same with 3.2 and above. Documentation is: Viewer URL parameters

I found this thread helpful for me as well.
Thread: Zoom to x and y from value in URL
http://forums.arcgis.com/threads/15082-Zoom-to-x-and-y-from-value-in-URL?highlight=geographicToWebMe...
0 Kudos