Select to view content in your preferred language

Can FindTask query more than 1 map?

763
4
08-31-2011 12:33 PM
AshleyOwens
Emerging Contributor
I would like to have the user select a layer from one map, then select all layers (possibly from other maps) they want to see that intersect the first map. I know FindTask can query a map and multiple layers, but can it query multiple maps?

Thanks!
Ashley
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Ashley,

   No the FindTask can only search one Map Service (not map) at a time. If you want to search multiple map services than you will just have to loop through them.
0 Kudos
AshleyOwens
Emerging Contributor
Thanks Robert.

I'd like to make sure I'm using the right approach. Here are the basic steps I'd like to include:
1. Select an object from Map Service 1.
2. Select intersecting layers of object (from step 1) from Map Services 2, 3 & 4.
3. Extract object & intersecting data from all chosen Map Services & layers into a file.

I know how to do step 3, but I'm not quite sure how to
a. determine when objects are intersecting, and
b. get results from more than 1 Map Service into 1 result set

Is the spatial portion of the existing Search Widget a good starting point for this functionality? Would the Data Extract widget be better? (http://help.arcgis.com/en/webapps/flexviewer/help/index.html#//01m300000025000000)

Thanks so much for your help!  --ashley
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Ashley,

   The existing search widget would be the way to go as it fires off a spatial Query using a graphic and returns graphics.
0 Kudos
AshleyOwens
Emerging Contributor
I am using the existing Search widget code and am unable to loop through multiple map services. I believe this is the sequence of functions that is called in the existing Search widget:
1. queryFeaturesSpatial()
2. queryFeaturesSpatial(), onResult()
3. bufferGeometries()
4. bufferGeometries(), bufferCompleteHandler()
5. queryFeaturesGraphical()
6. queryFeaturesGraphical(), onResult()
7. createSearchResults()
8. createSearchResults(), displayFields()

I have tried putting a hardcoded call to function queryFeaturesSpatial using another map service, but it stops in function bufferGeometries.
Has anyone else tried to do this?
0 Kudos