npm.io
1.0.5 • Published 9 years ago

leaflet-select

Licence
MIT
Version
1.0.5
Deps
0
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Leaflet Select

Leaflet Select is an easy-to-configure transparent dropdown plugin for leaflet.

Demo: click here


Requirements:

  • jQuery
  • Leaflet
  • FontAwesome

Installation:

via npm:

npm install leaflet-select --save

old fashioned way: download the repository and add the files inside src folder to your project.


Use:

var select = L.control.select({
	               label: 'Select',
	               data : [{title: String, ...}],
	               selected : function(item) {
	    	           @required
	    	           //callback when item is selected  
	               },
	               opened: function() {
	    		       @optional
	    	           //callback when dropdown opens
	               },
	               closed: function() {
	    	           @optional
	    	           //callback when dropdown closes
	               }
	           });

select.addTo(map);