X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9f817f83647b61d00662e61a81d3334c78783db8..69b967c9ff7c185f99ba881a8b8591c02c809628:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 5f84fb056..796a5f4d3 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -95,14 +95,25 @@ $(document).ready(function () { L.OSM.zoom({position: position}) .addTo(map); - L.control.locate({ + var locate = L.control.locate({ position: position, + icon: 'icon geolocate', + iconLoading: 'icon geolocate', strings: { title: I18n.t('javascripts.map.locate.title'), popup: I18n.t('javascripts.map.locate.popup') } }).addTo(map); + var locateContainer = locate.getContainer(); + + $(locateContainer) + .removeClass('leaflet-control-locate leaflet-bar') + .addClass('control-locate') + .children("a") + .removeClass('leaflet-bar-part leaflet-bar-part-single') + .addClass('control-button'); + var sidebar = L.OSM.sidebar('#map-ui') .addTo(map);