This replaces the patching of the vendored source that we had been
doing before and which we always forget to apply after updating it.
Fixes #1306
L.OSM.zoom({position: position})
.addTo(map);
L.OSM.zoom({position: position})
.addTo(map);
+ var locate = L.control.locate({
+ icon: 'icon geolocate',
+ iconLoading: 'icon geolocate',
strings: {
title: I18n.t('javascripts.map.locate.title'),
popup: I18n.t('javascripts.map.locate.popup')
}
}).addTo(map);
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);
var sidebar = L.OSM.sidebar('#map-ui')
.addTo(map);