In the ArcGIS query result on map example, the query window cannot be queried on the next layer of the map.

Source: Internet
Author: User

Original example URL: http://resources.esri.com/help/9.3/arcgisserver/apis/flex/samples/index.html

 

I changed the code as follows:

<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <s: Application xmlns: S = "Library: // ns.adobe.com/flex/spark" <br/> xmlns: FX = "http://ns.adobe.com/mxml/2009" <br/> xmlns: MX = "Library: // ns.adobe.com/flex/mx" <br/> xmlns: ESRI = "http://www.esri.com/2008/ags" <br/> pagetitle = "Query Task (with a map) "<br/> </P> <p> <FX: SCRIPT> <br/> <! -- [CDATA [<br/> Import COM. ESRI. AGS. graphic; <br/> Import COM. ESRI. AGS. featureset; <br/> Import MX. controls. alert; <br/> Import MX. RPC. asyncresponder; <br/> private function doquery (): void <br/>{< br/> querytask.exe cute (query, new asyncresponder (onresult, onfault )); <br/> function onresult (featureset: featureset, Token: Object = NULL): void <br/>{< br/> // No code needed in this simple sample, since the <br/> // graphiclayer is bound to the query result using <br/> // graphicprovider = "invalid querytask.exe cutelstresult. features} "<br/>}< br/> function onfault (Info: object, Token: Object = NULL): void <br/>{< br/> alert. show (info. tostring (), "query problem"); <br/>}< br/>] --> <br/> </FX: SCRIPT> <br/> <FX: declarations> <br/> <ESRI: querytask id = "querytask" showbusycursor = "true" <br/> url = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5"/> <br/> <ESRI: query ID = "query" text = "{qtext. text} "returngeometry =" true "outspatialreference =" {map. spatialreference} "> <br/> <ESRI: outfields> <br/> <FX: String> med_age </FX: String> <br/> <FX: string> pop2007 </FX: String> <br/> </ESRI: outfields> <br/> </ESRI: Query> <br/> </FX: declarations> <br/> <mx: panel title = "query a layer (search for a State) "layout =" horizontal "<br/> backgroundcolor =" 0xb2bfc6 "borderstyle =" solid "> <br/> <mx: textinput width = "100%" id = "qtext" Enter = "doquery ()" text = "California"/> <br/> <mx: button label = "do query" Click = "doquery ()"/> <br/> </MX: Panel> <br/> <ESRI: map id = "map"> <br/> <ESRI: extent> <br/> <ESRI: extent xmin = "-170" ymin = "15" xmax = "-65" Ymax = "75"> <br/> <ESRI: spatialreference wkid = "4326"/> <br/> </ESRI: extent> <br/> <ESRI: arcgistiledmapservicelayer <br/> url = "http://server.arcgisonline.com/ArcGIS/rest/services/NPS_Physical_World_2D/MapServer"/> <br/> <ESRI: graphicslayer id = "mygraphicslayer" graphicprovider = "{querytask.exe cutelstresult. features} "/> <br/> </ESRI: Map> <br/> </S: Application>

 

When browsing, you can find that the query window is on the next layer of the map. The map is displayed, but you cannot query it ......

 

Modifying ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.