X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6d5ba4651a56bf09157fd5be2b904f471ebbc0e7..ab4de87d1eef4546a96738154cf81b7d7f72d988:/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