1

There's an example in the Leaflet-ESRI documentation here: https://esri.github.io/esri-leaflet/examples/finding-features.html But the code doesn't seem to actually work, neither on the example page nor when I cut and paste it into jsbin.

I'm trying to create a search/find box for a user to provide text and then find features that include that text in their attributes. I'd love to see examples of this Find task in working action.

EDITED TO ADD: When I load the above page as http:// instead of https://, that does allow the features to be added to the map. However, the Find box still appears not to function properly. I'd like to see an example of the Find tool working properly.

1
  • we're in the middle of retooling the website and have removed the sample (for reasons you mention and others) thanks for the report. – john gravois Dec 15 '15 at 22:44
1

The example works, just don't load the github.io page via https, use http instead: http://esri.github.io/esri-leaflet/examples/finding-features.html

Using https, in most browswers, you will get a mixed content error, as the govUnits data is served from non-encrypted http. More on mixed content from MDN

3
  • That got the features on the screen! But the actual search box still doesn't seem to work -- unless I'm misunderstanding its function. When I type in words that do appear in the names of the federal properties (that are the features of the Map Layer), e.g. "Drum", "Allegheny", "Sequoia", etc., the system gives no response. – Abijah Dec 13 '15 at 13:49
  • I still don't know why the given example doesn't work (including with state names "Wisconsin," "Colorado", etc.) BUT once I started working with the code and substituted my own Map Layer, it worked just fine, highlighting the found polygons read. So all around the problems seem to have been with the example federal gov Map Layer. Thanks, toms, for your help. – Abijah Dec 14 '15 at 1:45
  • it is slow, but it does work for me ("colorado", "wisconsin")... anyway glad you were able to get it to work on your own data – toms Dec 14 '15 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.