X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/106ac7269dbb9ac2617e00674f11938940b4f4ab..533a10bee4797f316b843900efd62d12f5d85c59:/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