Browse Source

version 4.44.18 : nouveau fond de carte cartodb voyager + fonds cartodb toujours en https

retour sur r99273 pas de raison de s'embêter à gérer le http ou https pour cartodb
svn/root/tags/v4.47.18
bruno@eliaz.fr 4 years ago
parent
commit
28dff69ae0
  1. 16
      gis_options.php
  2. 80
      lib/leaflet/plugins/leaflet-providers.js
  3. 2
      paquet.xml

16
gis_options.php

@ -59,19 +59,27 @@ $gis_layers = array (
),
'cartodb_positron' => array(
'nom' => 'CartoDB Positron',
'layer' => substr($GLOBALS['meta']['adresse_site'], 0, 5) == 'https' ? 'L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png", L.tileLayer.provider("CartoDB.Positron").options)' : 'L.tileLayer.provider("CartoDB.Positron")'
'layer' => 'L.tileLayer.provider("CartoDB.Positron")'
),
'cartodb_positron_base' => array(
'nom' => 'CartoDB Positron Base',
'layer' => substr($GLOBALS['meta']['adresse_site'], 0, 5) == 'https' ? 'L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_nolabels/{z}/{x}/{y}.png", L.tileLayer.provider("CartoDB.PositronNoLabels").options)' : 'L.tileLayer.provider("CartoDB.PositronNoLabels")'
'layer' => 'L.tileLayer.provider("CartoDB.PositronNoLabels")'
),
'cartodb_darkmatter' => array(
'nom' => 'CartoDB DarkMatter',
'layer' => substr($GLOBALS['meta']['adresse_site'], 0, 5) == 'https' ? 'L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png", L.tileLayer.provider("CartoDB.DarkMatter").options)' : 'L.tileLayer.provider("CartoDB.DarkMatter")'
'layer' => 'L.tileLayer.provider("CartoDB.DarkMatter")'
),
'cartodb_darkmatter_base' => array(
'nom' => 'CartoDB DarkMatter Base',
'layer' => substr($GLOBALS['meta']['adresse_site'], 0, 5) == 'https' ? 'L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_nolabels/{z}/{x}/{y}.png", L.tileLayer.provider("CartoDB.DarkMatterNoLabels").options)' : 'L.tileLayer.provider("CartoDB.DarkMatterNoLabels")'
'layer' => 'L.tileLayer.provider("CartoDB.DarkMatterNoLabels")'
),
'cartodb_voyager' => array(
'nom' => 'CartoDB Voyager',
'layer' => 'L.tileLayer.provider("CartoDB.Voyager")'
),
'cartodb_voyager_base' => array(
'nom' => 'CartoDB Voyager Base',
'layer' => 'L.tileLayer.provider("CartoDB.VoyagerNoLabels")'
),
'stamen_toner' => array(
'nom' => 'Stamen Toner',

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

@ -50,19 +50,6 @@
};
}
// If retina option is set
if (provider.options.retina) {
// Check retina screen
if (options.detectRetina && L.Browser.retina) {
// The retina option will be active now
// But we need to prevent Leaflet retina mode
options.detectRetina = false;
} else {
// No retina, remove option
provider.options.retina = '';
}
}
// replace attribution placeholders with their values from toplevel provider attribution,
// recursively
var attributionReplacer = function (attr) {
@ -110,6 +97,13 @@
maxZoom: 18
}
},
CH: {
url: 'https://tile.osm.ch/switzerland/{z}/{x}/{y}.png',
options: {
maxZoom: 18,
bounds: [[45, 5], [48, 11]]
}
},
France: {
url: 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
options: {
@ -124,7 +118,7 @@
}
},
BZH: {
url: 'http://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png',
url: 'https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png',
options: {
attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://www.openstreetmap.bzh/" target="_blank">Breton OpenStreetMap Team</a>',
bounds: [[46.2, -5.5], [50, 0.7]]
@ -132,12 +126,33 @@
}
}
},
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: {
attribution: 'Map data: &copy; <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'
}
},
OpenPtMap: {
url: 'http://openptmap.org/tiles/{z}/{x}/{y}.png',
options: {
maxZoom: 17,
attribution: 'Map data: &copy; <a href="http://www.openptmap.org">OpenPtMap</a> contributors'
}
},
OpenTopoMap: {
url: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
options: {
@ -145,6 +160,27 @@
attribution: 'Map data: {attribution.OpenStreetMap}, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
}
},
OpenRailwayMap: {
url: 'https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png',
options: {
maxZoom: 19,
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://www.OpenRailwayMap.org">OpenRailwayMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
}
},
OpenFireMap: {
url: 'http://openfiremap.org/hytiles/{z}/{x}/{y}.png',
options: {
maxZoom: 19,
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="http://www.openfiremap.org">OpenFireMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
}
},
SafeCast: {
url: 'https://s3.amazonaws.com/te512.safecast.org/{z}/{x}/{y}.png',
options: {
maxZoom: 16,
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://blog.safecast.org/about/">SafeCast</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
}
},
Thunderforest: {
url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
options: {
@ -213,7 +249,7 @@
}
},
MapBox: {
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',
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; ' +
@ -224,7 +260,7 @@
}
},
Stamen: {
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}{r}.{ext}',
options: {
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
@ -499,7 +535,7 @@
}
},
CartoDB: {
url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/{variant}/{z}/{x}/{y}.png',
url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.png',
options: {
attribution: '{attribution.OpenStreetMap} &copy; <a href="http://cartodb.com/attributions">CartoDB</a>',
subdomains: 'abcd',
@ -512,7 +548,11 @@
PositronOnlyLabels: 'light_only_labels',
DarkMatter: 'dark_all',
DarkMatterNoLabels: 'dark_nolabels',
DarkMatterOnlyLabels: 'dark_only_labels'
DarkMatterOnlyLabels: 'dark_only_labels',
Voyager: 'rastertiles/voyager',
VoyagerNoLabels: 'rastertiles/voyager_nolabels',
VoyagerOnlyLabels: 'rastertiles/voyager_only_labels',
VoyagerLabelsUnder: 'rastertiles/voyager_labels_under'
}
},
HikeBike: {
@ -682,11 +722,11 @@
}
},
Wikimedia: {
url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png',
url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png',
options: {
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
minZoom: 1,
maxZoom: 18
maxZoom: 19
}
}
};

2
paquet.xml

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

Loading…
Cancel
Save