1.0.5 • Published 8 years ago
leaflet-select v1.0.5
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);