remove error from javascript file with L variable
This commit is contained in:
parent
c8baf0c280
commit
a9b001e762
7 changed files with 831 additions and 819 deletions
|
@ -1,4 +1,5 @@
|
|||
(function () {
|
||||
if (typeof L != 'undefined') {
|
||||
(function () {
|
||||
OSM = L.tileLayer("http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png", {
|
||||
attribution: '© Openstreetmap France | © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
});
|
||||
|
@ -98,4 +99,5 @@
|
|||
/**/
|
||||
}
|
||||
|
||||
}).call(this);
|
||||
}).call(this);
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
L.Control.EasyButtons = L.Control.extend({
|
||||
if (typeof L != 'undefined') {
|
||||
L.Control.EasyButtons = L.Control.extend({
|
||||
options: {
|
||||
position: 'topleft',
|
||||
title: '',
|
||||
|
@ -33,9 +34,9 @@ L.Control.EasyButtons = L.Control.extend({
|
|||
var icon = L.DomUtil.create('i', this.options.intendedIcon + extraClasses, this.link);
|
||||
icon.id = this.options.id;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
L.easyButton = function( btnIcon , btnFunction , btnTitle , btnMap , btnId) {
|
||||
L.easyButton = function( btnIcon , btnFunction , btnTitle , btnMap , btnId) {
|
||||
var newControl = new L.Control.EasyButtons();
|
||||
|
||||
if (btnIcon) newControl.options.intendedIcon = btnIcon;
|
||||
|
@ -55,4 +56,5 @@ L.easyButton = function( btnIcon , btnFunction , btnTitle , btnMap , btnId) {
|
|||
map.addControl(newControl);
|
||||
}
|
||||
return newControl;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
L.PhotonBase = L.Class.extend({
|
||||
if (typeof L != 'undefined') {
|
||||
L.PhotonBase = L.Class.extend({
|
||||
|
||||
forEach: function (els, callback) {
|
||||
Array.prototype.forEach.call(els, callback);
|
||||
|
@ -45,10 +46,10 @@ L.PhotonBase = L.Class.extend({
|
|||
return container;
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
L.PhotonSearch = L.PhotonBase.extend({
|
||||
L.PhotonSearch = L.PhotonBase.extend({
|
||||
|
||||
includes: L.Mixin.Events,
|
||||
|
||||
|
@ -363,10 +364,10 @@ L.PhotonSearch = L.PhotonBase.extend({
|
|||
};
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
L.Control.Photon = L.Control.extend({
|
||||
L.Control.Photon = L.Control.extend({
|
||||
|
||||
includes: L.Mixin.Events,
|
||||
|
||||
|
@ -392,16 +393,16 @@ L.Control.Photon = L.Control.extend({
|
|||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
L.Map.addInitHook(function () {
|
||||
L.Map.addInitHook(function () {
|
||||
if (this.options.photonControl) {
|
||||
this.photonControl = new L.Control.Photon(this.options.photonControlOptions || {});
|
||||
this.addControl(this.photonControl);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
L.PhotonReverse = L.PhotonBase.extend({
|
||||
L.PhotonReverse = L.PhotonBase.extend({
|
||||
|
||||
includes: L.Mixin.Events,
|
||||
|
||||
|
@ -441,4 +442,5 @@ L.PhotonReverse = L.PhotonBase.extend({
|
|||
};
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
L.SpinMapMixin = {
|
||||
if (typeof L != 'undefined') {
|
||||
L.SpinMapMixin = {
|
||||
spin: function (state, options) {
|
||||
if (!!state) {
|
||||
// start spinning !
|
||||
|
@ -19,11 +20,11 @@ L.SpinMapMixin = {
|
|||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
L.Map.include(L.SpinMapMixin);
|
||||
L.Map.include(L.SpinMapMixin);
|
||||
|
||||
L.Map.addInitHook(function () {
|
||||
L.Map.addInitHook(function () {
|
||||
this.on('layeradd', function (e) {
|
||||
// If added layer is currently loading, spin !
|
||||
if (e.layer.loading) this.spin(true);
|
||||
|
@ -38,4 +39,5 @@ L.Map.addInitHook(function () {
|
|||
e.layer.off('data:loaded');
|
||||
e.layer.off('data:loading');
|
||||
}, this);
|
||||
});
|
||||
});
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,6 @@
|
|||
(function () {
|
||||
if (typeof L != 'undefined') {
|
||||
(function () {
|
||||
|
||||
API_URL = '//api-adresse.data.gouv.fr';
|
||||
|
||||
var showSearchPoints = function (geojson) {
|
||||
|
@ -263,4 +265,5 @@
|
|||
}
|
||||
|
||||
|
||||
}).call(this);
|
||||
}).call(this);
|
||||
}
|
|
@ -16,6 +16,5 @@
|
|||
//= require_tree .
|
||||
//= require jquery
|
||||
//= require bootstrap-sprockets
|
||||
|
||||
//= require bootstrap-datepicker/core
|
||||
//= require bootstrap-datepicker/locales/bootstrap-datepicker.fr.js
|
Loading…
Add table
Add a link
Reference in a new issue