Upgrade leaflet from 1.3.4 to 1.7.1
|
@ -121,10 +121,12 @@ footer {
|
|||
.leaflet-control-layers-expanded a {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.leaflet-control-layers-list {
|
||||
padding: 3px 8px !important;
|
||||
color: white !important;
|
||||
background: #212121 !important;
|
||||
width: inherit !important;
|
||||
}
|
||||
|
||||
/* Scale */
|
||||
|
|
|
@ -211,6 +211,7 @@ form.form input[type=radio]+label img {
|
|||
padding: 3px 8px !important;
|
||||
color: white !important;
|
||||
background: #212121 !important;
|
||||
width: inherit !important;
|
||||
}
|
||||
|
||||
/* Scale */
|
||||
|
|
|
@ -42,7 +42,7 @@ $( document ).ready(function() {
|
|||
});
|
||||
|
||||
poi_layer = L.marker([47, 3], {draggable: true}).addTo(mymap);
|
||||
poi_layer.bindTooltip("Glissez moi au bon endroit.", {permanent: true, direction: 'top'}).openTooltip();
|
||||
poi_layer.bindTooltip("Glissez moi au bon endroit.", {permanent: true, direction: 'auto'}).openTooltip();
|
||||
|
||||
mymap.on('click', function(e){
|
||||
poi_layer.unbindTooltip();
|
||||
|
|
|
@ -218,6 +218,11 @@ L.Control.EasyButton = L.Control.extend({
|
|||
|
||||
state: function(newState){
|
||||
|
||||
// when called with no args, it's a getter
|
||||
if (arguments.length === 0) {
|
||||
return this._currentState.stateName;
|
||||
}
|
||||
|
||||
// activate by name
|
||||
if(typeof newState == 'string'){
|
||||
|
||||
|
|
|
@ -1,152 +1,168 @@
|
|||
L.Control.Fullscreen = L.Control.extend({
|
||||
options: {
|
||||
position: 'topleft',
|
||||
title: {
|
||||
'false': 'View Fullscreen',
|
||||
'true': 'Exit Fullscreen'
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD
|
||||
define(['leaflet'], factory);
|
||||
} else if (typeof module !== 'undefined') {
|
||||
// Node/CommonJS
|
||||
module.exports = factory(require('leaflet'));
|
||||
} else {
|
||||
// Browser globals
|
||||
if (typeof window.L === 'undefined') {
|
||||
throw new Error('Leaflet must be loaded first');
|
||||
}
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
var container = L.DomUtil.create('div', 'leaflet-control-fullscreen leaflet-bar leaflet-control');
|
||||
|
||||
this.link = L.DomUtil.create('a', 'leaflet-control-fullscreen-button leaflet-bar-part', container);
|
||||
this.link.href = '#';
|
||||
|
||||
this._map = map;
|
||||
this._map.on('fullscreenchange', this._toggleTitle, this);
|
||||
this._toggleTitle();
|
||||
|
||||
L.DomEvent.on(this.link, 'click', this._click, this);
|
||||
|
||||
return container;
|
||||
},
|
||||
|
||||
_click: function (e) {
|
||||
L.DomEvent.stopPropagation(e);
|
||||
L.DomEvent.preventDefault(e);
|
||||
this._map.toggleFullscreen(this.options);
|
||||
},
|
||||
|
||||
_toggleTitle: function() {
|
||||
this.link.title = this.options.title[this._map.isFullscreen()];
|
||||
factory(window.L);
|
||||
}
|
||||
});
|
||||
|
||||
L.Map.include({
|
||||
isFullscreen: function () {
|
||||
return this._isFullscreen || false;
|
||||
},
|
||||
|
||||
toggleFullscreen: function (options) {
|
||||
var container = this.getContainer();
|
||||
if (this.isFullscreen()) {
|
||||
if (options && options.pseudoFullscreen) {
|
||||
this._disablePseudoFullscreen(container);
|
||||
} else if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitCancelFullScreen) {
|
||||
document.webkitCancelFullScreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen();
|
||||
} else {
|
||||
this._disablePseudoFullscreen(container);
|
||||
}(function (L) {
|
||||
L.Control.Fullscreen = L.Control.extend({
|
||||
options: {
|
||||
position: 'topleft',
|
||||
title: {
|
||||
'false': 'View Fullscreen',
|
||||
'true': 'Exit Fullscreen'
|
||||
}
|
||||
} else {
|
||||
if (options && options.pseudoFullscreen) {
|
||||
this._enablePseudoFullscreen(container);
|
||||
} else if (container.requestFullscreen) {
|
||||
container.requestFullscreen();
|
||||
} else if (container.mozRequestFullScreen) {
|
||||
container.mozRequestFullScreen();
|
||||
} else if (container.webkitRequestFullscreen) {
|
||||
container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
|
||||
} else if (container.msRequestFullscreen) {
|
||||
container.msRequestFullscreen();
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
var container = L.DomUtil.create('div', 'leaflet-control-fullscreen leaflet-bar leaflet-control');
|
||||
|
||||
this.link = L.DomUtil.create('a', 'leaflet-control-fullscreen-button leaflet-bar-part', container);
|
||||
this.link.href = '#';
|
||||
|
||||
this._map = map;
|
||||
this._map.on('fullscreenchange', this._toggleTitle, this);
|
||||
this._toggleTitle();
|
||||
|
||||
L.DomEvent.on(this.link, 'click', this._click, this);
|
||||
|
||||
return container;
|
||||
},
|
||||
|
||||
_click: function (e) {
|
||||
L.DomEvent.stopPropagation(e);
|
||||
L.DomEvent.preventDefault(e);
|
||||
this._map.toggleFullscreen(this.options);
|
||||
},
|
||||
|
||||
_toggleTitle: function() {
|
||||
this.link.title = this.options.title[this._map.isFullscreen()];
|
||||
}
|
||||
});
|
||||
|
||||
L.Map.include({
|
||||
isFullscreen: function () {
|
||||
return this._isFullscreen || false;
|
||||
},
|
||||
|
||||
toggleFullscreen: function (options) {
|
||||
var container = this.getContainer();
|
||||
if (this.isFullscreen()) {
|
||||
if (options && options.pseudoFullscreen) {
|
||||
this._disablePseudoFullscreen(container);
|
||||
} else if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitCancelFullScreen) {
|
||||
document.webkitCancelFullScreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
document.msExitFullscreen();
|
||||
} else {
|
||||
this._disablePseudoFullscreen(container);
|
||||
}
|
||||
} else {
|
||||
this._enablePseudoFullscreen(container);
|
||||
if (options && options.pseudoFullscreen) {
|
||||
this._enablePseudoFullscreen(container);
|
||||
} else if (container.requestFullscreen) {
|
||||
container.requestFullscreen();
|
||||
} else if (container.mozRequestFullScreen) {
|
||||
container.mozRequestFullScreen();
|
||||
} else if (container.webkitRequestFullscreen) {
|
||||
container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
|
||||
} else if (container.msRequestFullscreen) {
|
||||
container.msRequestFullscreen();
|
||||
} else {
|
||||
this._enablePseudoFullscreen(container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
_enablePseudoFullscreen: function (container) {
|
||||
L.DomUtil.addClass(container, 'leaflet-pseudo-fullscreen');
|
||||
this._setFullscreen(true);
|
||||
this.fire('fullscreenchange');
|
||||
},
|
||||
|
||||
_disablePseudoFullscreen: function (container) {
|
||||
L.DomUtil.removeClass(container, 'leaflet-pseudo-fullscreen');
|
||||
this._setFullscreen(false);
|
||||
this.fire('fullscreenchange');
|
||||
},
|
||||
|
||||
_setFullscreen: function(fullscreen) {
|
||||
this._isFullscreen = fullscreen;
|
||||
var container = this.getContainer();
|
||||
if (fullscreen) {
|
||||
L.DomUtil.addClass(container, 'leaflet-fullscreen-on');
|
||||
} else {
|
||||
L.DomUtil.removeClass(container, 'leaflet-fullscreen-on');
|
||||
}
|
||||
this.invalidateSize();
|
||||
},
|
||||
|
||||
_onFullscreenChange: function (e) {
|
||||
var fullscreenElement =
|
||||
document.fullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.msFullscreenElement;
|
||||
|
||||
if (fullscreenElement === this.getContainer() && !this._isFullscreen) {
|
||||
_enablePseudoFullscreen: function (container) {
|
||||
L.DomUtil.addClass(container, 'leaflet-pseudo-fullscreen');
|
||||
this._setFullscreen(true);
|
||||
this.fire('fullscreenchange');
|
||||
} else if (fullscreenElement !== this.getContainer() && this._isFullscreen) {
|
||||
},
|
||||
|
||||
_disablePseudoFullscreen: function (container) {
|
||||
L.DomUtil.removeClass(container, 'leaflet-pseudo-fullscreen');
|
||||
this._setFullscreen(false);
|
||||
this.fire('fullscreenchange');
|
||||
},
|
||||
|
||||
_setFullscreen: function(fullscreen) {
|
||||
this._isFullscreen = fullscreen;
|
||||
var container = this.getContainer();
|
||||
if (fullscreen) {
|
||||
L.DomUtil.addClass(container, 'leaflet-fullscreen-on');
|
||||
} else {
|
||||
L.DomUtil.removeClass(container, 'leaflet-fullscreen-on');
|
||||
}
|
||||
this.invalidateSize();
|
||||
},
|
||||
|
||||
_onFullscreenChange: function (e) {
|
||||
var fullscreenElement =
|
||||
document.fullscreenElement ||
|
||||
document.mozFullScreenElement ||
|
||||
document.webkitFullscreenElement ||
|
||||
document.msFullscreenElement;
|
||||
|
||||
if (fullscreenElement === this.getContainer() && !this._isFullscreen) {
|
||||
this._setFullscreen(true);
|
||||
this.fire('fullscreenchange');
|
||||
} else if (fullscreenElement !== this.getContainer() && this._isFullscreen) {
|
||||
this._setFullscreen(false);
|
||||
this.fire('fullscreenchange');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
L.Map.mergeOptions({
|
||||
fullscreenControl: false
|
||||
});
|
||||
L.Map.mergeOptions({
|
||||
fullscreenControl: false
|
||||
});
|
||||
|
||||
L.Map.addInitHook(function () {
|
||||
if (this.options.fullscreenControl) {
|
||||
this.fullscreenControl = new L.Control.Fullscreen(this.options.fullscreenControl);
|
||||
this.addControl(this.fullscreenControl);
|
||||
}
|
||||
L.Map.addInitHook(function () {
|
||||
if (this.options.fullscreenControl) {
|
||||
this.fullscreenControl = new L.Control.Fullscreen(this.options.fullscreenControl);
|
||||
this.addControl(this.fullscreenControl);
|
||||
}
|
||||
|
||||
var fullscreenchange;
|
||||
var fullscreenchange;
|
||||
|
||||
if ('onfullscreenchange' in document) {
|
||||
fullscreenchange = 'fullscreenchange';
|
||||
} else if ('onmozfullscreenchange' in document) {
|
||||
fullscreenchange = 'mozfullscreenchange';
|
||||
} else if ('onwebkitfullscreenchange' in document) {
|
||||
fullscreenchange = 'webkitfullscreenchange';
|
||||
} else if ('onmsfullscreenchange' in document) {
|
||||
fullscreenchange = 'MSFullscreenChange';
|
||||
}
|
||||
if ('onfullscreenchange' in document) {
|
||||
fullscreenchange = 'fullscreenchange';
|
||||
} else if ('onmozfullscreenchange' in document) {
|
||||
fullscreenchange = 'mozfullscreenchange';
|
||||
} else if ('onwebkitfullscreenchange' in document) {
|
||||
fullscreenchange = 'webkitfullscreenchange';
|
||||
} else if ('onmsfullscreenchange' in document) {
|
||||
fullscreenchange = 'MSFullscreenChange';
|
||||
}
|
||||
|
||||
if (fullscreenchange) {
|
||||
var onFullscreenChange = L.bind(this._onFullscreenChange, this);
|
||||
if (fullscreenchange) {
|
||||
var onFullscreenChange = L.bind(this._onFullscreenChange, this);
|
||||
|
||||
this.whenReady(function () {
|
||||
L.DomEvent.on(document, fullscreenchange, onFullscreenChange);
|
||||
});
|
||||
this.whenReady(function () {
|
||||
L.DomEvent.on(document, fullscreenchange, onFullscreenChange);
|
||||
});
|
||||
|
||||
this.on('unload', function () {
|
||||
L.DomEvent.off(document, fullscreenchange, onFullscreenChange);
|
||||
});
|
||||
}
|
||||
});
|
||||
this.on('unload', function () {
|
||||
L.DomEvent.off(document, fullscreenchange, onFullscreenChange);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
L.control.fullscreen = function (options) {
|
||||
return new L.Control.Fullscreen(options);
|
||||
};
|
||||
L.control.fullscreen = function (options) {
|
||||
return new L.Control.Fullscreen(options);
|
||||
};
|
||||
}));
|
|
@ -1 +1 @@
|
|||
L.Control.Fullscreen=L.Control.extend({options:{position:"topleft",title:{"false":"View Fullscreen","true":"Exit Fullscreen"}},onAdd:function(map){var container=L.DomUtil.create("div","leaflet-control-fullscreen leaflet-bar leaflet-control");this.link=L.DomUtil.create("a","leaflet-control-fullscreen-button leaflet-bar-part",container);this.link.href="#";this._map=map;this._map.on("fullscreenchange",this._toggleTitle,this);this._toggleTitle();L.DomEvent.on(this.link,"click",this._click,this);return container},_click:function(e){L.DomEvent.stopPropagation(e);L.DomEvent.preventDefault(e);this._map.toggleFullscreen(this.options)},_toggleTitle:function(){this.link.title=this.options.title[this._map.isFullscreen()]}});L.Map.include({isFullscreen:function(){return this._isFullscreen||false},toggleFullscreen:function(options){var container=this.getContainer();if(this.isFullscreen()){if(options&&options.pseudoFullscreen){this._disablePseudoFullscreen(container)}else if(document.exitFullscreen){document.exitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}else{this._disablePseudoFullscreen(container)}}else{if(options&&options.pseudoFullscreen){this._enablePseudoFullscreen(container)}else if(container.requestFullscreen){container.requestFullscreen()}else if(container.mozRequestFullScreen){container.mozRequestFullScreen()}else if(container.webkitRequestFullscreen){container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}else if(container.msRequestFullscreen){container.msRequestFullscreen()}else{this._enablePseudoFullscreen(container)}}},_enablePseudoFullscreen:function(container){L.DomUtil.addClass(container,"leaflet-pseudo-fullscreen");this._setFullscreen(true);this.fire("fullscreenchange")},_disablePseudoFullscreen:function(container){L.DomUtil.removeClass(container,"leaflet-pseudo-fullscreen");this._setFullscreen(false);this.fire("fullscreenchange")},_setFullscreen:function(fullscreen){this._isFullscreen=fullscreen;var container=this.getContainer();if(fullscreen){L.DomUtil.addClass(container,"leaflet-fullscreen-on")}else{L.DomUtil.removeClass(container,"leaflet-fullscreen-on")}this.invalidateSize()},_onFullscreenChange:function(e){var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;if(fullscreenElement===this.getContainer()&&!this._isFullscreen){this._setFullscreen(true);this.fire("fullscreenchange")}else if(fullscreenElement!==this.getContainer()&&this._isFullscreen){this._setFullscreen(false);this.fire("fullscreenchange")}}});L.Map.mergeOptions({fullscreenControl:false});L.Map.addInitHook(function(){if(this.options.fullscreenControl){this.fullscreenControl=new L.Control.Fullscreen(this.options.fullscreenControl);this.addControl(this.fullscreenControl)}var fullscreenchange;if("onfullscreenchange"in document){fullscreenchange="fullscreenchange"}else if("onmozfullscreenchange"in document){fullscreenchange="mozfullscreenchange"}else if("onwebkitfullscreenchange"in document){fullscreenchange="webkitfullscreenchange"}else if("onmsfullscreenchange"in document){fullscreenchange="MSFullscreenChange"}if(fullscreenchange){var onFullscreenChange=L.bind(this._onFullscreenChange,this);this.whenReady(function(){L.DomEvent.on(document,fullscreenchange,onFullscreenChange)});this.on("unload",function(){L.DomEvent.off(document,fullscreenchange,onFullscreenChange)})}});L.control.fullscreen=function(options){return new L.Control.Fullscreen(options)};
|
||||
(function(factory){var L;if(typeof define==="function"&&define.amd){define(["leaflet"],factory)}else if(typeof module!=="undefined"){L=require("leaflet");module.exports=factory(L)}else{if(typeof window.L==="undefined"){throw new Error("Leaflet must be loaded first")}factory(window.L)}})(function(L){L.Control.Fullscreen=L.Control.extend({options:{position:"topleft",title:{"false":"View Fullscreen","true":"Exit Fullscreen"}},onAdd:function(map){var container=L.DomUtil.create("div","leaflet-control-fullscreen leaflet-bar leaflet-control");this.link=L.DomUtil.create("a","leaflet-control-fullscreen-button leaflet-bar-part",container);this.link.href="#";this._map=map;this._map.on("fullscreenchange",this._toggleTitle,this);this._toggleTitle();L.DomEvent.on(this.link,"click",this._click,this);return container},_click:function(e){L.DomEvent.stopPropagation(e);L.DomEvent.preventDefault(e);this._map.toggleFullscreen(this.options)},_toggleTitle:function(){this.link.title=this.options.title[this._map.isFullscreen()]}});L.Map.include({isFullscreen:function(){return this._isFullscreen||false},toggleFullscreen:function(options){var container=this.getContainer();if(this.isFullscreen()){if(options&&options.pseudoFullscreen){this._disablePseudoFullscreen(container)}else if(document.exitFullscreen){document.exitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}else{this._disablePseudoFullscreen(container)}}else{if(options&&options.pseudoFullscreen){this._enablePseudoFullscreen(container)}else if(container.requestFullscreen){container.requestFullscreen()}else if(container.mozRequestFullScreen){container.mozRequestFullScreen()}else if(container.webkitRequestFullscreen){container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}else if(container.msRequestFullscreen){container.msRequestFullscreen()}else{this._enablePseudoFullscreen(container)}}},_enablePseudoFullscreen:function(container){L.DomUtil.addClass(container,"leaflet-pseudo-fullscreen");this._setFullscreen(true);this.fire("fullscreenchange")},_disablePseudoFullscreen:function(container){L.DomUtil.removeClass(container,"leaflet-pseudo-fullscreen");this._setFullscreen(false);this.fire("fullscreenchange")},_setFullscreen:function(fullscreen){this._isFullscreen=fullscreen;var container=this.getContainer();if(fullscreen){L.DomUtil.addClass(container,"leaflet-fullscreen-on")}else{L.DomUtil.removeClass(container,"leaflet-fullscreen-on")}this.invalidateSize()},_onFullscreenChange:function(e){var fullscreenElement=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;if(fullscreenElement===this.getContainer()&&!this._isFullscreen){this._setFullscreen(true);this.fire("fullscreenchange")}else if(fullscreenElement!==this.getContainer()&&this._isFullscreen){this._setFullscreen(false);this.fire("fullscreenchange")}}});L.Map.mergeOptions({fullscreenControl:false});L.Map.addInitHook(function(){if(this.options.fullscreenControl){this.fullscreenControl=new L.Control.Fullscreen(this.options.fullscreenControl);this.addControl(this.fullscreenControl)}var fullscreenchange;if("onfullscreenchange"in document){fullscreenchange="fullscreenchange"}else if("onmozfullscreenchange"in document){fullscreenchange="mozfullscreenchange"}else if("onwebkitfullscreenchange"in document){fullscreenchange="webkitfullscreenchange"}else if("onmsfullscreenchange"in document){fullscreenchange="MSFullscreenChange"}if(fullscreenchange){var onFullscreenChange=L.bind(this._onFullscreenChange,this);this.whenReady(function(){L.DomEvent.on(document,fullscreenchange,onFullscreenChange)});this.on("unload",function(){L.DomEvent.off(document,fullscreenchange,onFullscreenChange)})}});L.control.fullscreen=function(options){return new L.Control.Fullscreen(options)}});
|
0
views/third/leaflet/images/layers-2x.png
Executable file → Normal file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
0
views/third/leaflet/images/layers.png
Executable file → Normal file
Before Width: | Height: | Size: 696 B After Width: | Height: | Size: 696 B |
0
views/third/leaflet/images/marker-icon-2x.png
Executable file → Normal file
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
0
views/third/leaflet/images/marker-icon.png
Executable file → Normal file
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
0
views/third/leaflet/images/marker-shadow.png
Executable file → Normal file
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 618 B |
9
views/third/leaflet/leaflet.css
Executable file → Normal file
|
@ -25,6 +25,10 @@
|
|||
user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
/* Prevents IE11 from highlighting tiles in blue */
|
||||
.leaflet-tile::selection {
|
||||
background: transparent;
|
||||
}
|
||||
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
|
||||
.leaflet-safari .leaflet-tile {
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
|
@ -237,7 +241,8 @@
|
|||
|
||||
.leaflet-marker-icon.leaflet-interactive,
|
||||
.leaflet-image-layer.leaflet-interactive,
|
||||
.leaflet-pane > svg path.leaflet-interactive {
|
||||
.leaflet-pane > svg path.leaflet-interactive,
|
||||
svg.leaflet-image-layer.leaflet-interactive path {
|
||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
@ -527,7 +532,7 @@
|
|||
}
|
||||
|
||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||||
zoom: 1;
|
||||
-ms-zoom: 1;
|
||||
}
|
||||
.leaflet-oldie .leaflet-popup-tip {
|
||||
width: 24px;
|
||||
|
|