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);
$('.welcome .close-wrap').on('click', function() {
$('.welcome').hide();
- $.cookie('_osm_welcome', 'hide', { expires: expiry });
+ $.cookie('_osm_welcome', 'hide', { expires: expiry, path: '/' });
});
+ var bannerExpiry = new Date();
+ bannerExpiry.setYear(bannerExpiry.getFullYear() + 1);
+
$('#banner .close-wrap').on('click', function(e) {
- debugger;
var cookieId = e.target.id;
$('#banner').hide();
e.preventDefault();
if (cookieId) {
- $.cookie(cookieId, 'hide', { expires: expiry });
+ $.cookie(cookieId, 'hide', { expires: bannerExpiry, path: '/' });
}
});