fixed marker icon bug
This commit is contained in:
parent
8d2fbedcbe
commit
57ee23da66
@ -128,7 +128,7 @@ export class MapService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
newMarker(m: Marker) {
|
newMarker(m: Marker) {
|
||||||
let icon = m.icon ? m.icon : buildMarker(m.color);
|
let icon = m.icon ? this.getIcon(m.icon) : buildMarker(m.color);
|
||||||
let marker = L.marker(m.latlng, Object.assign({autoPan: false}, m, {icon: icon})).addTo(this.map);
|
let marker = L.marker(m.latlng, Object.assign({autoPan: false}, m, {icon: icon})).addTo(this.map);
|
||||||
if(m.label) marker.bindTooltip(m.label, {permanent: true, direction: 'bottom'});
|
if(m.label) marker.bindTooltip(m.label, {permanent: true, direction: 'bottom'});
|
||||||
marker.on('click', e => this.click.next({latlng: {lat: e.latlng.lat, lng: e.latlng.lng}, symbol: m, item: marker}));
|
marker.on('click', e => this.click.next({latlng: {lat: e.latlng.lat, lng: e.latlng.lng}, symbol: m, item: marker}));
|
||||||
|
Loading…
Reference in New Issue
Block a user