The use of the search box in the ArcGIS API for JavaScript __arcgis

Source: Internet
Author: User

We often need to use the search box to search for a certain data on the map, and then show it on the map. This time we need to use Esri.dijit.Search (). When setting the sources inside, you need to be aware that you must use the online Featurelayer. Such as:

Although sources can also be set with local settings (with Featurecollectionobject settings), it cannot be queried after this setting, which is clearly written in the official document. URL: Https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html#featurelayer2

So if the data is local, you need to upload it to Arcgisonline (http://www.arcgisonline.cn/), then publish the data, then refer to the online address and assign the value to Featurelayer.

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.