Skip to content

Commit bf1e2df

Browse files
committed
new versions of leaflet packages
1 parent f492363 commit bf1e2df

File tree

10 files changed

+105
-84
lines changed

10 files changed

+105
-84
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
### 4.4.4 / 2503xx
1+
### 4.4.4 / 250316
22

3-
* new version L.Control.Layers.Tree.js
3+
* new version L.Control.Layers.Tree.js, leaflet-providers.js, Control.FullScreen, togeojson.umd.js
44
* fontawesome-free-6.7.2
55
* Plugin Check issues
66
* targetmarker: different zoom, documentation

changes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Differences to the Plugins WordPress version
22

3-
* new version L.Control.Layers.Tree.js
3+
* new version L.Control.Layers.Tree.js, leaflet-providers.js, Control.FullScreen, togeojson.umd.js
44
* fontawesome-free-6.7.2
55
* Plugin Check issues
66
* targetmarker: different zoom, documentation

extensions-leaflet-map.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Extensions for Leaflet Map Github Version
44
* Description: Extends the WordPress Plugin <a href="https://wordpress.org/plugins/leaflet-map/">Leaflet Map</a> with Leaflet Plugins and other functions.
55
* Plugin URI: https://leafext.de/en/
6-
* Version: 4.4-250313
6+
* Version: 4.4-250316
77
* Requires PHP: 7.4
88
* Requires Plugins: leaflet-map
99
* Author: hupe13

leaflet-plugins/leaflet-providers/leaflet-providers.js

Lines changed: 81 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function (root, factory) {
1+
(function(root, factory) {
22
if (typeof define === 'function' && define.amd) {
33
// AMD. Register as an anonymous module.
44
define(['leaflet'], factory);
@@ -9,11 +9,11 @@
99
// Assume Leaflet is loaded into global object L already
1010
factory(L);
1111
}
12-
}(this, function (L) {
12+
}(this, function(L) {
1313
'use strict';
1414

1515
L.TileLayer.Provider = L.TileLayer.extend({
16-
initialize: function (arg, options) {
16+
initialize: function(arg, options) {
1717
var providers = L.TileLayer.Provider.providers;
1818

1919
var parts = arg.split('.');
@@ -52,12 +52,13 @@
5252

5353
// replace attribution placeholders with their values from toplevel provider attribution,
5454
// recursively
55-
var attributionReplacer = function (attr) {
55+
var attributionReplacer = function(attr) {
5656
if (attr.indexOf('{attribution.') === -1) {
5757
return attr;
5858
}
59-
return attr.replace(/\{attribution.(\w*)\}/g,
60-
function (match, attributionName) {
59+
return attr.replace(
60+
/\{attribution.(\w*)\}/g,
61+
function(match, attributionName) {
6162
return attributionReplacer(providers[attributionName].options.attribution);
6263
}
6364
);
@@ -342,7 +343,7 @@
342343
}
343344
},
344345
Thunderforest: {
345-
url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
346+
url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}{r}.png?apikey={apikey}',
346347
options: {
347348
attribution:
348349
'&copy; <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',
@@ -374,17 +375,17 @@
374375
Neighbourhood: 'neighbourhood'
375376
}
376377
},
377-
BaseMapDE: {
378-
url: 'https://sgx.geodatenzentrum.de/wmts_basemapde/tile/1.0.0/{variant}/default/GLOBAL_WEBMERCATOR/{z}/{y}/{x}.png',
379-
options: {
380-
attribution: 'Map data: &copy; <a href="http://www.govdata.de/dl-de/by-2-0">dl-de/by-2-0</a>',
381-
variant: 'de_basemapde_web_raster_farbe',
382-
},
383-
variants: {
384-
Color: 'de_basemapde_web_raster_farbe',
385-
Grey: 'de_basemapde_web_raster_grau'
386-
}
387-
},
378+
BaseMapDE: {
379+
url: 'https://sgx.geodatenzentrum.de/wmts_basemapde/tile/1.0.0/{variant}/default/GLOBAL_WEBMERCATOR/{z}/{y}/{x}.png',
380+
options: {
381+
attribution: 'Map data: &copy; <a href="http://www.govdata.de/dl-de/by-2-0">dl-de/by-2-0</a>',
382+
variant: 'de_basemapde_web_raster_farbe',
383+
},
384+
variants: {
385+
Color: 'de_basemapde_web_raster_farbe',
386+
Grey: 'de_basemapde_web_raster_grau'
387+
}
388+
},
388389
CyclOSM: {
389390
url: 'https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
390391
options: {
@@ -443,9 +444,9 @@
443444
maxZoom: 21
444445
},
445446
variants: {
446-
Streets: 'streets',
447-
Basic: 'basic',
448-
Bright: 'bright',
447+
Streets: 'streets-v2',
448+
Basic: 'basic-v2',
449+
Bright: 'bright-v2',
449450
Pastel: 'pastel',
450451
Positron: 'positron',
451452
Hybrid: {
@@ -454,12 +455,35 @@
454455
ext: 'jpg'
455456
}
456457
},
457-
Toner: 'toner',
458-
Topo: 'topo',
459-
Voyager: 'voyager',
458+
Toner: 'toner-v2',
459+
Topo: 'topo-v2',
460+
Voyager: 'voyager-v2',
460461
Ocean: 'ocean',
461462
Backdrop: 'backdrop',
462-
Dataviz: 'dataviz'
463+
Dataviz: 'dataviz',
464+
DatavizLight: 'dataviz-light',
465+
DatavizDark: 'dataviz-dark',
466+
Aquarelle: {
467+
options: {
468+
variant: 'aquarelle',
469+
ext: 'webp'
470+
}
471+
},
472+
Landscape: 'landscape',
473+
Openstreetmap: {
474+
options: {
475+
variant: 'openstreetmap',
476+
ext: 'jpg'
477+
}
478+
},
479+
Outdoor: 'outdoor-v2',
480+
Satellite: {
481+
options: {
482+
variant: 'satellite',
483+
ext: 'jpg'
484+
}
485+
},
486+
Winter: 'winter-v2',
463487
}
464488
},
465489
TomTom: {
@@ -579,6 +603,7 @@
579603
}
580604
},
581605
HERE: {
606+
582607
/*
583608
* HERE maps, formerly Nokia maps.
584609
* These basemaps are free, but you need an api id and app key. Please sign up at
@@ -593,8 +618,8 @@
593618
'Map &copy; 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
594619
subdomains: '1234',
595620
mapID: 'newest',
596-
'app_id': '<insert your app_id here>',
597-
'app_code': '<insert your app_code here>',
621+
app_id: '<insert your app_id here>',
622+
app_code: '<insert your app_code here>',
598623
base: 'base',
599624
variant: 'normal.day',
600625
maxZoom: 20,
@@ -698,6 +723,7 @@
698723
}
699724
},
700725
HEREv3: {
726+
701727
/*
702728
* HERE maps API Version 3.
703729
* These basemaps are free, but you need an API key. Please sign up at
@@ -918,12 +944,12 @@
918944
attribution: 'Kaartgegevens &copy; <a href="https://www.kadaster.nl">Kadaster</a>'
919945
},
920946
variants: {
921-
'standaard': 'standaard',
922-
'pastel': 'pastel',
923-
'grijs': 'grijs',
924-
'water': 'water',
925-
'luchtfoto': {
926-
'url': 'https://service.pdok.nl/hwh/luchtfotorgb/wmts/v1_0/Actueel_ortho25/EPSG:3857/{z}/{x}/{y}.jpeg',
947+
standaard: 'standaard',
948+
pastel: 'pastel',
949+
grijs: 'grijs',
950+
water: 'water',
951+
luchtfoto: {
952+
url: 'https://service.pdok.nl/hwh/luchtfotorgb/wmts/v1_0/Actueel_ortho25/EPSG:3857/{z}/{x}/{y}.jpeg',
927953
}
928954
}
929955
},
@@ -1135,9 +1161,9 @@
11351161
}
11361162
},
11371163
AzureMaps: {
1138-
url:
1139-
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
1140-
'&tilesetId={variant}&x={x}&y={y}&zoom={z}&language={language}'+
1164+
url:
1165+
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}' +
1166+
'&tilesetId={variant}&x={x}&y={y}&zoom={z}&language={language}' +
11411167
'&subscription-key={subscriptionKey}',
11421168
options: {
11431169
attribution: 'See https://docs.microsoft.com/en-us/rest/api/maps/render-v2/get-map-tile for details.',
@@ -1153,9 +1179,9 @@
11531179
MicrosoftBaseHybridRoad: 'microsoft.base.hybrid.road',
11541180
MicrosoftTerraMain: 'microsoft.terra.main',
11551181
MicrosoftWeatherInfraredMain: {
1156-
url:
1157-
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
1158-
'&tilesetId={variant}&x={x}&y={y}&zoom={z}'+
1182+
url:
1183+
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}' +
1184+
'&tilesetId={variant}&x={x}&y={y}&zoom={z}' +
11591185
'&timeStamp={timeStamp}&language={language}' +
11601186
'&subscription-key={subscriptionKey}',
11611187
options: {
@@ -1165,9 +1191,9 @@
11651191
},
11661192
},
11671193
MicrosoftWeatherRadarMain: {
1168-
url:
1169-
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
1170-
'&tilesetId={variant}&x={x}&y={y}&zoom={z}'+
1194+
url:
1195+
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}' +
1196+
'&tilesetId={variant}&x={x}&y={y}&zoom={z}' +
11711197
'&timeStamp={timeStamp}&language={language}' +
11721198
'&subscription-key={subscriptionKey}',
11731199
options: {
@@ -1197,21 +1223,21 @@
11971223
}
11981224
}
11991225
},
1200-
TopPlusOpen: {
1201-
url: 'http://sgx.geodatenzentrum.de/wmts_topplus_open/tile/1.0.0/{variant}/default/WEBMERCATOR/{z}/{y}/{x}.png',
1202-
options: {
1203-
maxZoom: 18,
1204-
attribution: 'Map data: &copy; <a href="http://www.govdata.de/dl-de/by-2-0">dl-de/by-2-0</a>',
1205-
variant: 'web',
1206-
},
1207-
variants: {
1208-
Color: 'web',
1209-
Grey: 'web_grau'
1210-
}
1211-
}
1226+
TopPlusOpen: {
1227+
url: 'http://sgx.geodatenzentrum.de/wmts_topplus_open/tile/1.0.0/{variant}/default/WEBMERCATOR/{z}/{y}/{x}.png',
1228+
options: {
1229+
maxZoom: 18,
1230+
attribution: 'Map data: &copy; <a href="http://www.govdata.de/dl-de/by-2-0">dl-de/by-2-0</a>',
1231+
variant: 'web',
1232+
},
1233+
variants: {
1234+
Color: 'web',
1235+
Grey: 'web_grau'
1236+
}
1237+
}
12121238
};
12131239

1214-
L.tileLayer.provider = function (provider, options) {
1240+
L.tileLayer.provider = function(provider, options) {
12151241
return new L.TileLayer.Provider(provider, options);
12161242
};
12171243

leaflet-plugins/leaflet.fullscreen/Control.FullScreen.css

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
1-
.fullscreen-icon {
1+
.leaflet-fullscreen-icon {
22
background-image: url('icon-fullscreen.svg');
33
background-size: 26px 52px;
44
}
55

6-
.fullscreen-icon.leaflet-fullscreen-on {
6+
.leaflet-fullscreen-icon.leaflet-fullscreen-on {
77
background-position: 0 -26px;
88
}
99

10-
.leaflet-touch .fullscreen-icon {
10+
.leaflet-touch .leaflet-fullscreen-icon {
1111
background-position: 2px 2px;
1212
}
1313

14-
.leaflet-touch .fullscreen-icon.leaflet-fullscreen-on {
14+
.leaflet-touch .leaflet-fullscreen-icon.leaflet-fullscreen-on {
1515
background-position: 2px -24px;
1616
}
1717

1818
/* Safari still needs this vendor-prefix: https://caniuse.com/mdn-css_selectors_fullscreen */
1919
/* stylelint-disable-next-line selector-no-vendor-prefix */
20-
.leaflet-container:-webkit-full-screen {
21-
width: 100% !important;
22-
height: 100% !important;
23-
z-index: 99999;
24-
}
25-
20+
.leaflet-container:-webkit-full-screen,
2621
.leaflet-container:fullscreen {
2722
width: 100% !important;
2823
height: 100% !important;

leaflet-plugins/leaflet.fullscreen/Control.FullScreen.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* (c) Bruno B.; MIT License
44
* Uses fragments from the package 'screenfull'
55
*/
6-
(function (root, factory) {
6+
(function(root, factory) {
77
if (typeof define === 'function' && define.amd) {
88
// define an AMD module that requires 'leaflet'
99
// and resolve to an object containing leaflet
@@ -70,7 +70,7 @@
7070
const fullscreenAPI = {
7171
request(element, options) {
7272
return new Promise((resolve, reject) => {
73-
const onFullScreenEntered = function () {
73+
const onFullScreenEntered = function() {
7474
this.off('change', onFullScreenEntered);
7575
resolve();
7676
}.bind(this);
@@ -90,7 +90,7 @@
9090
return;
9191
}
9292

93-
const onFullScreenExit = function () {
93+
const onFullScreenExit = function() {
9494
this.off('change', onFullScreenExit);
9595
resolve();
9696
}.bind(this);
@@ -158,7 +158,7 @@
158158
if (this.options.content) {
159159
content = this.options.content;
160160
} else {
161-
className += ' fullscreen-icon';
161+
className += ' leaflet-fullscreen-icon';
162162
}
163163

164164
this._createButton(this.options.title, className, content, container, this.toggleFullScreen, this);
@@ -270,13 +270,13 @@
270270
}
271271
});
272272

273-
leaflet.Map.addInitHook(function () {
273+
leaflet.Map.addInitHook(function() {
274274
if (this.options.fullscreenControl) {
275275
this.addControl(leaflet.control.fullscreen(this.options.fullscreenControlOptions));
276276
}
277277
});
278278

279-
leaflet.control.fullscreen = function (options) {
279+
leaflet.control.fullscreen = function(options) {
280280
return new leaflet.Control.FullScreen(options);
281281
};
282282

0 commit comments

Comments
 (0)