X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9cd8c4006c1c2611bb7cbb4ffb513050d0611fe7..6d8d41b166d59ddb3250d7b8d5b5f275c86bedf1:/app/assets/javascripts/index/directions-endpoint.js diff --git a/app/assets/javascripts/index/directions-endpoint.js b/app/assets/javascripts/index/directions-endpoint.js index a4b3a928b..97b841f14 100644 --- a/app/assets/javascripts/index/directions-endpoint.js +++ b/app/assets/javascripts/index/directions-endpoint.js @@ -1,15 +1,8 @@ -OSM.DirectionsEndpoint = function Endpoint(map, input, iconUrl, dragCallback, changeCallback) { +OSM.DirectionsEndpoint = function Endpoint(map, input, marker, dragCallback, changeCallback) { const endpoint = {}; endpoint.marker = L.marker([0, 0], { - icon: L.icon({ - iconUrl: iconUrl, - iconSize: [25, 41], - iconAnchor: [12, 41], - popupAnchor: [1, -34], - shadowUrl: OSM.MARKER_SHADOW, - shadowSize: [41, 41] - }), + icon: OSM.getMarker(marker), draggable: true, autoPan: true });