[GIS] Search and zoom json features in Leaflet

jsonleafletmapboxsearch

How can I add a search box to a map that allows users to search>zoom to a polygon name?

So, if there are 100 polygons, the user would be able to type the name of the polygon (i.e., Symantec), then the map would zoom to the matching county.

Best Answer

There are various solutions for this (if you don't want exact zoom but centering). You can use using the list from Leaflet plugins page:

You can also take a look on the Bootleaf project, a Bootstrap based Leaflet template using typehead.js (an autocomplete search box).

All the mentioned projects above have demos available so you can check if it's the expected solution for you.

Related Question