Patch classes on the locate control
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
This commit is contained in:
parent
a1ff77ec56
commit
6d9bddfa47
1 changed files with 12 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue