Update to leaflet 1.8.0
This commit is contained in:
parent
0676bea453
commit
2f6eebcd97
4 changed files with 19 additions and 16 deletions
|
@ -73,7 +73,7 @@ OSM.Note = function (map) {
|
|||
var data = $(".details").data(),
|
||||
latLng = L.latLng(data.coordinates.split(","));
|
||||
|
||||
if (!map.hasLayer(halo)) {
|
||||
if (!halo || !map.hasLayer(halo)) {
|
||||
halo = L.circleMarker(latLng, {
|
||||
weight: 2.5,
|
||||
radius: 20,
|
||||
|
@ -83,7 +83,8 @@ OSM.Note = function (map) {
|
|||
map.addLayer(halo);
|
||||
}
|
||||
|
||||
if (map.hasLayer(currentNote)) map.removeLayer(currentNote);
|
||||
if (currentNote && map.hasLayer(currentNote)) map.removeLayer(currentNote);
|
||||
|
||||
currentNote = L.marker(latLng, {
|
||||
icon: noteIcons[data.status],
|
||||
opacity: 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue