X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d8c1b28fde32414c9fd7f212dff8954942ef0b5c..e6487f1d447e00c2cb9d3c57edd13fc311473824:/app/assets/javascripts/leaflet.map.js?ds=inline diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js index 75396fd73..44aa530d9 100644 --- a/app/assets/javascripts/leaflet.map.js +++ b/app/assets/javascripts/leaflet.map.js @@ -258,15 +258,17 @@ L.OSM.Map = L.Map.extend({ this._object = object; this._objectLayer = L.featureGroup().addTo(this); - + 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 var map = this;