X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/31a6d207286ed46e5ef582cfa77b76fa9d74ea9e..bf7b2cf38194380c56fbb419ced588a29c27f7b8:/app/assets/javascripts/embed.js.erb diff --git a/app/assets/javascripts/embed.js.erb b/app/assets/javascripts/embed.js.erb index 09e211b0a..57572ca48 100644 --- a/app/assets/javascripts/embed.js.erb +++ b/app/assets/javascripts/embed.js.erb @@ -28,7 +28,10 @@ window.onload = function () { if (args.marker) { L.marker(args.marker, {icon: L.icon({ iconUrl: <%= asset_path('images/marker-icon.png').to_json %>, - shadowUrl: <%= asset_path('images/marker-shadow.png').to_json %> + iconSize: new L.Point(25, 41), + iconAnchor: new L.Point(12, 41), + shadowUrl: <%= asset_path('images/marker-shadow.png').to_json %>, + shadowSize: new L.Point(41, 41) })}).addTo(map); } @@ -37,5 +40,5 @@ window.onload = function () { L.latLng(args.bbox[3], args.bbox[2])]) } else { map.fitWorld(); - } + } };