When querying with query, the following configuration is used
var querytask = new Esri.tasks.QueryTask (applicationmodelonesearchpoiurl); var query = new Esri.tasks.Query (); Query.geometry = geometry; Query.outspatialreference = map.spatialreference; Query.spatialrelationship = Esri.tasks.Query.SPATIAL_REL_INTERSECTS; Query.returngeometry = true; Querytask.execute (query, Applicationmodelonegetsearchdata, errorcallback);
General use of the box when the query.geometry, we generally give a extent variable, but when we need a polygon such as a polygon to query, will appear ESRI.CONFIG.DEFAULTS.IO.PROXYURL Not set "error
Because polygons (which contain more than one point) cause the URL of the Web service to have more than 2048 parameters, we use the Get method (the maximum number of characters is 2048) instead of the Post method. So we need a proxy page to do the agent, the specific reference http://blog.csdn.net/lz576825608/article/details/7989391
is in the query before adding a sentence Esri.config.defaults.io.proxyUrl = "Proxy.ashx", and then go to the Internet to download the relevant files, in PROXY.ASHX and proxy.config add the appropriate configuration code on the line. Configure code in Proxy.config to add <serverurl url= "http://myserver/ArcGIS/rest/services/POI/Shoping/MapServer/0"
Matchall= "true"
Token= "" ></serverUrl>
ArcGIS API for Javascript uses query queries for features within a circle with a point radius "Esri.config.defaults.io.proxyUrl not set" error