I think you are correct Mattias. Using the identifyTask will do the trick as long as you have all your layers in one service. Combine multiple services (WebmapServers, WMS, WFS) in to one identifier task would have been great. Something for 3.1?In addition to setting your buffered line as geometry in the identifyparameters you also need to set the layeroptions to "all". Something like his://Executes when drawing is completed assuming you draw your line private function drawEnd(event:DrawEvent):void { var geom:Geometry = event.graphic.geometry; identifyParameters.returnGeometry = true; identifyParameters.tolerance = 3; identifyParameters.width = map.width; identifyParameters.height = map.height; identifyParameters.layerOption = "all"; identifyParameters.mapExtent = map.extent; identifyTask.showBusyCursor = true; //Bufferering drawing var bufferParameters:BufferParameters = new BufferParameters(); bufferParameters.geometries = [ geom ]; bufferParameters.distances = [ <your buffer distance value> ]; bufferParameters.unit = GeometryService.UNIT_METER; bufferParameters.outSpatialReference = map.spatialReference; bufferParameters.unionResults = true; geometryService.addEventListener(GeometryServiceEvent.BUFFER_COMPLETE, bufferCompleteHandler1); geometryService.buffer(bufferParameters); function bufferCompleteHandler1(event:GeometryServiceEvent):void { for each (var polygon:Polygon in event.result) { geometryService.removeEventListener(GeometryServiceEvent.BUFFER_COMPLETE, bufferCompleteHandler1); identifyParameters.geometry = polygon; identifyTaskIntresseletaren.execute(identifyParameters) break; } } } <esri:GeometryService id="geometryService" url="<your geometry service> "/> <esri:IdentifyParameters id="identifyParameters"/> <esri:IdentifyTask id="identifyTask" concurrency="last" showBusyCursor="true" executeComplete="identifyTask_executeCompleteHandler(event)"/>This will work as long as you don't combine your spatial search with a text search.text search - use findtaskspatial search - use identifytasktext and spatial search - use querytask but can only search on one layer and field at a timesearching in one layer only - use querytask, much faster than findtask and identifytaskKarl MVäxjö municipality
//Executes when drawing is completed assuming you draw your line private function drawEnd(event:DrawEvent):void { var geom:Geometry = event.graphic.geometry; identifyParameters.returnGeometry = true; identifyParameters.tolerance = 3; identifyParameters.width = map.width; identifyParameters.height = map.height; identifyParameters.layerOption = "all"; identifyParameters.mapExtent = map.extent; identifyTask.showBusyCursor = true; //Bufferering drawing var bufferParameters:BufferParameters = new BufferParameters(); bufferParameters.geometries = [ geom ]; bufferParameters.distances = [ <your buffer distance value> ]; bufferParameters.unit = GeometryService.UNIT_METER; bufferParameters.outSpatialReference = map.spatialReference; bufferParameters.unionResults = true; geometryService.addEventListener(GeometryServiceEvent.BUFFER_COMPLETE, bufferCompleteHandler1); geometryService.buffer(bufferParameters); function bufferCompleteHandler1(event:GeometryServiceEvent):void { for each (var polygon:Polygon in event.result) { geometryService.removeEventListener(GeometryServiceEvent.BUFFER_COMPLETE, bufferCompleteHandler1); identifyParameters.geometry = polygon; identifyTaskIntresseletaren.execute(identifyParameters) break; } } } <esri:GeometryService id="geometryService" url="<your geometry service> "/> <esri:IdentifyParameters id="identifyParameters"/> <esri:IdentifyTask id="identifyTask" concurrency="last" showBusyCursor="true" executeComplete="identifyTask_executeCompleteHandler(event)"/>
Lefteris, There is no such widget as there is currently no good Flex API path for doing this. The find task will search all layers in a map service but it will only search based on a string and not geometry.
Lefteris, It is pretty straight forward. Choose the graphical search.Choose the layer that you will be searching.Check the buffer graphic checkbox and define the unit of measure and distance.If you are only going to draw a single graphic then uncheck enable multi-part graphics.Draw a graphic using one of the draw tools.If you unchecked the enable multi-part graphics in step 4 then that is it, if you left it checked then you have to click the search button.I have some pretty in depth documentation pdfs in the download that you need to look at.
Lefteris, The eSearch does exactly that.http://www.arcgis.com/rc/item.html?id=5d4995ccdb99429185dfd8d8fb2a513eDon't forget to click the Mark as answer check on this post and to click the top arrow (promote) as shown below:[ATTACH=CONFIG]0[/ATTACH]
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.