X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/31d27da6bc667825df754438985a56f4b593df80..c8f6d6df0f2d7ad15de4833e855701b05d1dde5e:/app/assets/javascripts/leaflet.map.js diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js index b2d4abcb7..44aa530d9 100644 --- a/app/assets/javascripts/leaflet.map.js +++ b/app/assets/javascripts/leaflet.map.js @@ -261,11 +261,13 @@ L.OSM.Map = L.Map.extend({ L.circleMarker(object.latLng, haloStyle).addTo(this._objectLayer); - L.marker(object.latLng, { - icon: object.icon, - opacity: 1, - interactive: true - }).addTo(this._objectLayer); + if (object.icon) { + L.marker(object.latLng, { + icon: object.icon, + opacity: 1, + interactive: true + }).addTo(this._objectLayer); + } if (callback) callback(this._objectLayer.getBounds()); } else { // element or changeset handled by L.OSM.DataLayer