leaflet-search / README.md

The default branch has multiple heads

Leaflet.Control.Search

What

A leaflet control that search markers location by property with ajax/jsonp autocomplete feature and json fields complete re-mapping

Tested in Leaflet 0.5.1

How

Insert leaflet-search.css styles to your css page

Adding the search control to the map:

map.addControl( new L.Control.Search({layer: searchLayer}) );
//searchLayer if a L.LayerGroup contains searched markers

other examples:

map.addControl( new L.Control.Search({url: 'search.php?q={s}', jsonpParam: 'callback'}) );
//searchJsonpUrl is jsonp service for retrieve elements locations

map.addControl( new L.Control.Search({
        url: 'http://nominatim.openstreetmap.org/search?format=json&q={s}',
        jsonpParam: 'json_callback',
        propertyName: 'display_name',
        propertyLoc: ['lat','lon']
    }) );
//implements Geocode Searching using OSM API

Where

Source code: github bitbucket

Demos: labs.easyblog.it/maps/leaflet-search

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.