Commit 818e8da8 authored by Niels Holt's avatar Niels Holt

fcoo/leaflet-plugins 1.3.6 is a fork of shramov/leaflet-plugins 1.3.* but it...

fcoo/leaflet-plugins 1.3.6 is a fork of shramov/leaflet-plugins 1.3.* but it don't work with leaflet 1.0.0-rc.1
As a temp solutions fcoo/leaflet-plugins is replaced with shramov/leaflet-plugins 1.6.*
parent b0b0dc37
{
"name": "ifm-maps",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/FCOO/ifm-maps",
"authors": [
"Jesper Larsen jla@fcoo.dk",
......@@ -21,7 +21,7 @@
"leaflet-control-legend": "fcoo/leaflet-control-legend",
"leaflet-categorized-layers": "fcoo/leaflet-categorized-layers",
"leaflet-control-osm-geocoder": "https://github.com/k4r573n/leaflet-control-osm-geocoder.git",
"leaflet-plugins": "fcoo/leaflet-plugins",
"leaflet-plugins": "shramov/leaflet-plugins",
"leaflet-time-slider": "fcoo/leaflet-time-slider#latest",
"leaflet-control-vertical": "fcoo/leaflet-control-vertical",
"leaflet-control-datetime": "fcoo/leaflet-control-datetime",
......
......@@ -54713,7 +54713,7 @@ L.Control.Permalink = L.Control.extend({
text: 'Permalink'
},
initialize: function(options) {
initialize: function (options) {
L.Util.setOptions(this, options);
this._params = {};
this._set_urlvars();
......@@ -54724,7 +54724,7 @@ L.Control.Permalink = L.Control.extend({
}
},
onAdd: function(map) {
onAdd: function (map) {
this._container = L.DomUtil.create('div', 'leaflet-control-attribution leaflet-control-permalink');
L.DomEvent.disableClickPropagation(this._container);
this._map = map;
......@@ -54737,7 +54737,7 @@ L.Control.Permalink = L.Control.extend({
if (this.options.useAnchor && 'onhashchange' in window) {
var _this = this, fn = window.onhashchange;
window.onhashchange = function() {
window.onhashchange = function () {
_this._set_urlvars();
if (fn) return fn();
};
......@@ -54748,14 +54748,14 @@ L.Control.Permalink = L.Control.extend({
return this._container;
},
_update_center: function() {
_update_center: function () {
if (!this._map) return;
var center = this._round_point(this._map.getCenter());
this._update({zoom: this._map.getZoom(), lat: center.lat, lon: center.lng});
this._update({zoom: String(this._map.getZoom()), lat: String(center.lat), lon: String(center.lng)});
},
_update_href: function() {
_update_href: function () {
var params = L.Util.getParamString(this._params);
var sep = '?';
if (this.options.useAnchor) sep = '#';
......@@ -54766,7 +54766,7 @@ L.Control.Permalink = L.Control.extend({
return url;
},
_round_point : function(point) {
_round_point : function (point) {
var bounds = this._map.getBounds(), size = this._map.getSize();
var ne = bounds.getNorthEast(), sw = bounds.getSouthWest();
......@@ -54785,8 +54785,8 @@ L.Control.Permalink = L.Control.extend({
return point;
},
_update: function(obj, source) {
for(var i in obj) {
_update: function (obj) {
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (obj[i] !== null && obj[i] !== undefined)
this._params[i] = obj[i];
......@@ -54797,18 +54797,19 @@ L.Control.Permalink = L.Control.extend({
this._update_href();
},
_set_urlvars: function()
_set_urlvars: function ()
{
this._url_base = window.location.href.split('#')[0].split('?')[0];
var p;
if (this.options.useAnchor)
if (this.options.useAnchor) {
p = L.UrlUtil.queryParse(L.UrlUtil.hash());
else
this._url_base = window.location.href.split('#')[0];
} else {
p = L.UrlUtil.queryParse(L.UrlUtil.query());
this._url_base = window.location.href.split('#')[0].split('?')[0];
}
function eq(x, y) {
for(var i in x)
function eq (x, y) {
for (var i in x)
if (x.hasOwnProperty(i) && x[i] !== y[i])
return false;
return true;
......@@ -54821,7 +54822,7 @@ L.Control.Permalink = L.Control.extend({
this.fire('update', {params: this._params});
},
_set_center: function(e)
_set_center: function (e)
{
var params = e.params;
if (params.zoom === undefined ||
......@@ -54832,13 +54833,13 @@ L.Control.Permalink = L.Control.extend({
});
L.UrlUtil = {
queryParse: function(s) {
queryParse: function (s) {
var p = {};
var sep = '&';
if (s.search('&') !== -1)
sep = '&';
var params = s.split(sep);
for(var i = 0; i < params.length; i++) {
for (var i = 0; i < params.length; i++) {
var tmp = params[i].split('=');
if (tmp.length !== 2) continue;
p[tmp[0]] = decodeURI(tmp[1]);
......@@ -54846,14 +54847,14 @@ L.UrlUtil = {
return p;
},
query: function() {
query: function () {
var href = window.location.href.split('#')[0], idx = href.indexOf('?');
if (idx < 0)
return '';
return href.slice(idx+1);
},
hash: function() { return window.location.hash.slice(1); },
hash: function () { return window.location.hash.slice(1); },
updateParamString: function (q, obj) {
var p = L.UrlUtil.queryParse(q);
......@@ -54713,7 +54713,7 @@ L.Control.Permalink = L.Control.extend({
text: 'Permalink'
},
initialize: function(options) {
initialize: function (options) {
L.Util.setOptions(this, options);
this._params = {};
this._set_urlvars();
......@@ -54724,7 +54724,7 @@ L.Control.Permalink = L.Control.extend({
}
},
onAdd: function(map) {
onAdd: function (map) {
this._container = L.DomUtil.create('div', 'leaflet-control-attribution leaflet-control-permalink');
L.DomEvent.disableClickPropagation(this._container);
this._map = map;
......@@ -54737,7 +54737,7 @@ L.Control.Permalink = L.Control.extend({
if (this.options.useAnchor && 'onhashchange' in window) {
var _this = this, fn = window.onhashchange;
window.onhashchange = function() {
window.onhashchange = function () {
_this._set_urlvars();
if (fn) return fn();
};
......@@ -54748,14 +54748,14 @@ L.Control.Permalink = L.Control.extend({
return this._container;
},
_update_center: function() {
_update_center: function () {
if (!this._map) return;
var center = this._round_point(this._map.getCenter());
this._update({zoom: this._map.getZoom(), lat: center.lat, lon: center.lng});
this._update({zoom: String(this._map.getZoom()), lat: String(center.lat), lon: String(center.lng)});
},
_update_href: function() {
_update_href: function () {
var params = L.Util.getParamString(this._params);
var sep = '?';
if (this.options.useAnchor) sep = '#';
......@@ -54766,7 +54766,7 @@ L.Control.Permalink = L.Control.extend({
return url;
},
_round_point : function(point) {
_round_point : function (point) {
var bounds = this._map.getBounds(), size = this._map.getSize();
var ne = bounds.getNorthEast(), sw = bounds.getSouthWest();
......@@ -54785,8 +54785,8 @@ L.Control.Permalink = L.Control.extend({
return point;
},
_update: function(obj, source) {
for(var i in obj) {
_update: function (obj) {
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (obj[i] !== null && obj[i] !== undefined)
this._params[i] = obj[i];
......@@ -54797,18 +54797,19 @@ L.Control.Permalink = L.Control.extend({
this._update_href();
},
_set_urlvars: function()
_set_urlvars: function ()
{
this._url_base = window.location.href.split('#')[0].split('?')[0];
var p;
if (this.options.useAnchor)
if (this.options.useAnchor) {
p = L.UrlUtil.queryParse(L.UrlUtil.hash());
else
this._url_base = window.location.href.split('#')[0];
} else {
p = L.UrlUtil.queryParse(L.UrlUtil.query());
this._url_base = window.location.href.split('#')[0].split('?')[0];
}
function eq(x, y) {
for(var i in x)
function eq (x, y) {
for (var i in x)
if (x.hasOwnProperty(i) && x[i] !== y[i])
return false;
return true;
......@@ -54821,7 +54822,7 @@ L.Control.Permalink = L.Control.extend({
this.fire('update', {params: this._params});
},
_set_center: function(e)
_set_center: function (e)
{
var params = e.params;
if (params.zoom === undefined ||
......@@ -54832,13 +54833,13 @@ L.Control.Permalink = L.Control.extend({
});
L.UrlUtil = {
queryParse: function(s) {
queryParse: function (s) {
var p = {};
var sep = '&';
if (s.search('&amp;') !== -1)
sep = '&amp;';
var params = s.split(sep);
for(var i = 0; i < params.length; i++) {
for (var i = 0; i < params.length; i++) {
var tmp = params[i].split('=');
if (tmp.length !== 2) continue;
p[tmp[0]] = decodeURI(tmp[1]);
......@@ -54846,14 +54847,14 @@ L.UrlUtil = {
return p;
},
query: function() {
query: function () {
var href = window.location.href.split('#')[0], idx = href.indexOf('?');
if (idx < 0)
return '';
return href.slice(idx+1);
},
hash: function() { return window.location.hash.slice(1); },
hash: function () { return window.location.hash.slice(1); },
updateParamString: function (q, obj) {
var p = L.UrlUtil.queryParse(q);
......@@ -61723,7 +61724,7 @@ You can find the project at: https://github.com/domoritz/leaflet-locatecontrol
});
//L.Control.Layers.include({
L.Control.CategorizedLayers.include({
L.Control.CategorizedLayers.include({
chooseBaseLayer: function(name) {
//console.log('Choosing baselayer');
var layer, obj, i;
......@@ -61744,12 +61745,12 @@ You can find the project at: https://github.com/domoritz/leaflet-locatecontrol
obj = baseLayers[i];
if (!obj._overlay && this._map.hasLayer(obj))
this._map.removeLayer(obj);
}
}
this._map.addLayer(layer);
this._update();
},
currentBaseLayer: function() {
currentBaseLayer: function() {
var baseLayers = this._layers[Object.keys(this._layers)[0]];
for (var i in baseLayers) {
if (!baseLayers.hasOwnProperty(i)) {
......@@ -61762,6 +61763,7 @@ You can find the project at: https://github.com/domoritz/leaflet-locatecontrol
}
}
});
})(L, this, document);
;
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,8 +5,8 @@
OWNER : FCOO - Forsvarets Center for Operativ Oceanografi /
Defence Centre for Operational Oceanography
APPLICATION : ifm-maps
GITHUB VERSION: 2.0.0
BUILD : 02-Jun-2016 14:43
GITHUB VERSION: 2.0.1
BUILD : 09-Jun-2016 15:03
CONTACT : info@fcoo.dk
*****************************************************
......@@ -61,7 +61,7 @@ CONTACT : info@fcoo.dk
<link rel="dns-prefetch" href="//tiles04.fcoo.dk">
<link href="ifm-maps_2016-06-02-14-43-36.css" rel="stylesheet">
<link href="ifm-maps_2016-06-09-15-03-15.css" rel="stylesheet">
</head>
<body>
......@@ -70,7 +70,7 @@ CONTACT : info@fcoo.dk
<script type="text/javascript" src="ifm-maps_2016-06-02-14-43-36.js"></script>
<script type="text/javascript" src="ifm-maps_2016-06-09-15-03-15.js"></script>
</body>
</html>
......@@ -5,8 +5,8 @@
OWNER : FCOO - Forsvarets Center for Operativ Oceanografi /
Defence Centre for Operational Oceanography
APPLICATION : ifm-maps
GITHUB VERSION: 2.0.0
BUILD : 02-Jun-2016 14:43
GITHUB VERSION: 2.0.1
BUILD : 09-Jun-2016 15:03
CONTACT : info@fcoo.dk
*****************************************************
......@@ -61,7 +61,7 @@ CONTACT : info@fcoo.dk
<link rel="dns-prefetch" href="//tiles04.fcoo.dk">
<link href="ifm-maps_2016-06-02-14-43-36.min.css" rel="stylesheet">
<link href="ifm-maps_2016-06-09-15-03-15.min.css" rel="stylesheet">
</head>
<body>
......@@ -70,7 +70,7 @@ CONTACT : info@fcoo.dk
<script type="text/javascript" src="ifm-maps_2016-06-02-14-43-36.min.js"></script>
<script type="text/javascript" src="ifm-maps_2016-06-09-15-03-15.min.js"></script>
</body>
</html>
This diff is collapsed.
{
"name": "test-gruntfile",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/FCOO/ifm-maps",
"authors": [
"Jesper Larsen jla@fcoo.dk",
......
......@@ -41,7 +41,7 @@
});
//L.Control.Layers.include({
L.Control.CategorizedLayers.include({
L.Control.CategorizedLayers.include({
chooseBaseLayer: function(name) {
//console.log('Choosing baselayer');
var layer, obj, i;
......@@ -62,12 +62,12 @@
obj = baseLayers[i];
if (!obj._overlay && this._map.hasLayer(obj))
this._map.removeLayer(obj);
}
}
this._map.addLayer(layer);
this._update();
},
currentBaseLayer: function() {
currentBaseLayer: function() {
var baseLayers = this._layers[Object.keys(this._layers)[0]];
for (var i in baseLayers) {
if (!baseLayers.hasOwnProperty(i)) {
......@@ -80,4 +80,5 @@
}
}
});
})(L, this, document);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment