]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Update bundle
[rails.git] / app / assets / javascripts / index.js
index 5f84fb0566e8d34ab601e8ee4379302fe4bb608a..796a5f4d31d85f4ced3929b12cda6f091798cef3 100644 (file)
@@ -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);