Add 20km allowed zone icon (#347)
Co-authored-by: Gautier P <gautier_git@damsy.net>
This commit is contained in:
parent
1958f55f18
commit
779c720b7d
11 changed files with 296 additions and 24 deletions
|
|
@ -1,8 +1,8 @@
|
|||
BR.PoiMarkers = L.Control.extend({
|
||||
markersLayer: null,
|
||||
circlego: null,
|
||||
|
||||
options: {
|
||||
routing: null,
|
||||
shortcut: {
|
||||
draw: {
|
||||
enable: 80, // char code for 'p'
|
||||
|
|
@ -10,6 +10,10 @@ BR.PoiMarkers = L.Control.extend({
|
|||
}
|
||||
}
|
||||
},
|
||||
initialize: function(routing) {
|
||||
this.routing = routing;
|
||||
this.circlego = null;
|
||||
},
|
||||
|
||||
onAdd: function(map) {
|
||||
var self = this;
|
||||
|
|
@ -54,7 +58,8 @@ BR.PoiMarkers = L.Control.extend({
|
|||
draw: function(enable) {
|
||||
this.drawButton.state(enable ? 'deactivate-poi' : 'activate-poi');
|
||||
if (enable) {
|
||||
this.options.routing.draw(false);
|
||||
this.routing.draw(false);
|
||||
this.circlego.draw(false);
|
||||
this.map.on('click', this.onMapClick, this);
|
||||
L.DomUtil.addClass(this.map.getContainer(), 'pois-draw-enabled');
|
||||
} else {
|
||||
|
|
@ -129,7 +134,7 @@ BR.PoiMarkers = L.Control.extend({
|
|||
getMarkers: function() {
|
||||
return this.markersLayer.getLayers().map(function(it) {
|
||||
return {
|
||||
latlng: it._latlng,
|
||||
latlng: it.getLatLng(),
|
||||
name: it.options.name
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue