JSPM

  • Created
  • Published
  • Downloads 5216
  • Score
    100M100P100Q120058F
  • License MIT

Leaflet Control for searching markers/features by attribute on map or remote searching in jsonp/ajax

Package Exports

  • leaflet-search
  • leaflet-search/dist/leaflet-search.src.css

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (leaflet-search) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Leaflet Control Search

npm version

A Leaflet control that search markers/features location by custom property.
Support ajax/jsonp autocompletion and JSON data filter/remapping.

Copyright 2016 Stefano Cudini

Tested in Leaflet 0.7.7,1.0

Image

#Where

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

Source code:
Github NPM

Bug tracking: Waffle.io

Websites that use Leaflet.Control.Search

#Examples (require src/leaflet-search.css)

Adding the search control to the map:

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

Short way:

L.map('map', { searchControl: {layer: searchLayer} });

AMD module:

require(["leaflet", "leafletSearch"],function(L, LeafletSearch) {

    //... initialize leaflet map and dataLayer ...

    map.addControl( new LeafletSearch({
        layer: dataLayer
    }) );
});

#Build

Therefore the deployment require npm installed in your system.

npm install
grunt