Browse Source

version 4.47.0 : update lib leaflet providers

svn/root/tags/v4.47.18
bruno@eliaz.fr 3 years ago
parent
commit
cceb6aca9f
  1. 8
      gis_options.php
  2. 134
      lib/leaflet/plugins/leaflet-providers.js
  3. 2
      paquet.xml

8
gis_options.php

@ -17,10 +17,6 @@ $gis_layers = array (
'nom' => 'OpenStreetMap',
'layer' => 'L.tileLayer.provider("OpenStreetMap")'
),
'openstreetmap_blackandwhite' => array(
'nom' => 'OpenStreetMap Black and White',
'layer' => 'L.tileLayer.provider("OpenStreetMap.BlackAndWhite")'
),
'openstreetmap_de' => array(
'nom' => 'OpenStreetMap DE',
'layer' => 'L.tileLayer.provider("OpenStreetMap.DE")'
@ -41,10 +37,6 @@ $gis_layers = array (
'nom' => 'OpenMapSurfer',
'layer' => 'L.tileLayer.provider("OpenMapSurfer")'
),
'openmapsurfer_grayscale' => array(
'nom' => 'OpenMapSurfer Grayscale',
'layer' => 'L.tileLayer.provider("OpenMapSurfer.Grayscale")'
),
'hydda' => array(
'nom' => 'Hydda',
'layer' => 'L.tileLayer.provider("Hydda")'

134
lib/leaflet/plugins/leaflet-providers.js

@ -56,7 +56,7 @@
if (attr.indexOf('{attribution.') === -1) {
return attr;
}
return attr.replace(/\{attribution.(\w*)\}/,
return attr.replace(/\{attribution.(\w*)\}/g,
function (match, attributionName) {
return attributionReplacer(providers[attributionName].options.attribution);
}
@ -81,16 +81,10 @@
options: {
maxZoom: 19,
attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
},
variants: {
Mapnik: {},
BlackAndWhite: {
url: 'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png',
options: {
maxZoom: 18
}
},
DE: {
url: 'https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
options: {
@ -114,7 +108,10 @@
HOT: {
url: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
options: {
attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'
attribution:
'{attribution.OpenStreetMap}, ' +
'Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> ' +
'hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
}
},
BZH: {
@ -126,20 +123,6 @@
}
}
},
OpenInfraMap: {
url: 'https://tiles-{s}.openinframap.org/{variant}/{z}/{x}/{y}.png',
options: {
maxZoom: 18,
attribution:
'{attribution.OpenStreetMap}, <a href="http://www.openinframap.org/about.html">About OpenInfraMap</a>'
},
variants: {
Power: 'power',
Telecom: 'telecoms',
Petroleum: 'petroleum',
Water: 'water'
}
},
OpenSeaMap: {
url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
options: {
@ -213,24 +196,51 @@
}
},
OpenMapSurfer: {
url: 'https://korona.geog.uni-heidelberg.de/tiles/{variant}/x={x}&y={y}&z={z}',
url: 'https://maps.heigit.org/openmapsurfer/tiles/{variant}/webmercator/{z}/{x}/{y}.png',
options: {
maxZoom: 20,
maxZoom: 19,
variant: 'roads',
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> &mdash; Map data {attribution.OpenStreetMap}'
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> | Map data '
},
variants: {
Roads: 'roads',
Roads: {
options: {
variant: 'roads',
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
}
},
Hybrid: {
options: {
variant: 'hybrid',
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
}
},
AdminBounds: {
options: {
variant: 'adminb',
maxZoom: 19
maxZoom: 18,
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
}
},
ContourLines: {
options: {
variant: 'asterc',
maxZoom: 18,
minZoom: 13,
attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>'
}
},
Hillshade: {
options: {
variant: 'asterh',
maxZoom: 18,
attribution: '{attribution.OpenMapSurfer} <a href="https://lpdaac.usgs.gov/products/aster_policies">ASTER GDEM</a>, <a href="http://srtm.csi.cgiar.org/">SRTM</a>'
}
},
Grayscale: {
ElementsAtRisk: {
options: {
variant: 'roadsg',
maxZoom: 19
variant: 'elements_at_risk',
attribution: '{attribution.OpenMapSurfer}{attribution.OpenStreetMap}'
}
}
}
@ -252,10 +262,11 @@
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}',
options: {
attribution:
'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; ' +
'Map data {attribution.OpenStreetMap}',
'<a href="https://www.mapbox.com/about/maps/" target="_blank">&copy; Mapbox</a> ' +
'{attribution.OpenStreetMap} ' +
'<a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>',
subdomains: 'abcd',
id: 'streets',
id: 'mapbox.streets',
accessToken: '<insert your access token here>',
}
},
@ -280,9 +291,10 @@
TonerLabels: 'toner-labels',
TonerLite: 'toner-lite',
Watercolor: {
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
options: {
variant: 'watercolor',
ext: 'jpg',
minZoom: 1,
maxZoom: 16
}
@ -302,7 +314,7 @@
}
},
TopOSMRelief: {
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
options: {
variant: 'toposm-color-relief',
ext: 'jpg',
@ -428,19 +440,15 @@
/*
* HERE maps, formerly Nokia maps.
* These basemaps are free, but you need an API key. Please sign up at
* http://developer.here.com/getting-started
*
* Note that the base urls contain '.cit' whichs is HERE's
* 'Customer Integration Testing' environment. Please remove for production
* envirionments.
* https://developer.here.com/plans
*/
url:
'https://{s}.{base}.maps.cit.api.here.com/maptile/2.1/' +
'https://{s}.{base}.maps.api.here.com/maptile/2.1/' +
'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
'app_id={app_id}&app_code={app_code}&lg={language}',
options: {
attribution:
'Map &copy; 1987-2014 <a href="http://developer.here.com">HERE</a>',
'Map &copy; 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
subdomains: '1234',
mapID: 'newest',
'app_id': '<insert your app_id here>',
@ -465,7 +473,10 @@
normalNightMobile: 'normal.night.mobile',
normalNightGrey: 'normal.night.grey',
normalNightGreyMobile: 'normal.night.grey.mobile',
normalNightTransit: 'normal.night.transit',
normalNightTransitMobile: 'normal.night.transit.mobile',
reducedDay: 'reduced.day',
reducedNight: 'reduced.night',
basicMap: {
options: {
type: 'basetile'
@ -496,6 +507,18 @@
variant: 'hybrid.day.mobile'
}
},
hybridDayTransit: {
options: {
base: 'aerial',
variant: 'hybrid.day.transit'
}
},
hybridDayGrey: {
options: {
base: 'aerial',
variant: 'hybrid.grey.day'
}
},
pedestrianDay: 'pedestrian.day',
pedestrianNight: 'pedestrian.night',
satelliteDay: {
@ -537,9 +560,9 @@
}
},
CartoDB: {
url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.png',
url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png',
options: {
attribution: '{attribution.OpenStreetMap} &copy; <a href="http://cartodb.com/attributions">CartoDB</a>',
attribution: '{attribution.OpenStreetMap} &copy; <a href="https://carto.com/attributions">CARTO</a>',
subdomains: 'abcd',
maxZoom: 19,
variant: 'light_all'
@ -558,7 +581,7 @@
}
},
HikeBike: {
url: 'http://{s}.tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png',
url: 'https://tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png',
options: {
maxZoom: 19,
attribution: '{attribution.OpenStreetMap}',
@ -763,6 +786,23 @@
}
}
}
},
OneMapSG: {
url: 'https://maps-{s}.onemap.sg/v3/{variant}/{z}/{x}/{y}.png',
options: {
variant: 'Default',
minZoom: 11,
maxZoom: 18,
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
attribution: '<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data &copy; contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
},
variants: {
Default: 'Default',
Night: 'Night',
Original: 'Original',
Grey: 'Grey',
LandLot: 'LandLot'
}
}
};

2
paquet.xml

@ -1,7 +1,7 @@
<paquet
prefix="gis"
categorie="divers"
version="4.46.0"
version="4.47.0"
schema="2.1.0"
etat="stable"
compatibilite="[3.0.0;3.2.*]"

Loading…
Cancel
Save