ArcGIS API for Javascript uses query queries for features within a circle with a point radius "Esri.config.defaults.io.proxyUrl not set" error

Source: Internet
Author: User

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

Related Article

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.