|
50 | 50 | };
|
51 | 51 | }
|
52 | 52 |
|
53 |
| - // If retina option is set |
54 |
| - if (provider.options.retina) { |
55 |
| - // Check retina screen |
56 |
| - if (options.detectRetina && L.Browser.retina) { |
57 |
| - // The retina option will be active now |
58 |
| - // But we need to prevent Leaflet retina mode |
59 |
| - options.detectRetina = false; |
60 |
| - } else { |
61 |
| - // No retina, remove option |
62 |
| - provider.options.retina = ''; |
63 |
| - } |
64 |
| - } |
65 |
| - |
66 | 53 | // replace attribution placeholders with their values from toplevel provider attribution,
|
67 | 54 | // recursively
|
68 | 55 | var attributionReplacer = function (attr) {
|
|
113 | 100 | CH: {
|
114 | 101 | url: '//tile.osm.ch/switzerland/{z}/{x}/{y}.png',
|
115 | 102 | options: {
|
116 |
| - maxZoom: 18 |
| 103 | + maxZoom: 18, |
| 104 | + bounds: [[45, 5], [48, 11]] |
117 | 105 | }
|
118 | 106 | },
|
119 | 107 | France: {
|
|
130 | 118 | }
|
131 | 119 | },
|
132 | 120 | BZH: {
|
133 |
| - url: 'https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png', |
| 121 | + url: '//tile.openstreetmap.bzh/br/{z}/{x}/{y}.png', |
134 | 122 | options: {
|
135 | 123 | attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://www.openstreetmap.bzh/" target="_blank">Breton OpenStreetMap Team</a>',
|
136 | 124 | bounds: [[46.2, -5.5], [50, 0.7]]
|
|
146 | 134 | '{attribution.OpenStreetMap}, <a href="http://www.openinframap.org/about.html">About OpenInfraMap</a>'
|
147 | 135 | },
|
148 | 136 | variants: {
|
149 |
| - Power: 'power' , |
150 |
| - Telecom: 'telecoms' , |
151 |
| - Petroleum: 'petroleum' , |
152 |
| - Water: 'water' |
| 137 | + Power: 'power', |
| 138 | + Telecom: 'telecoms', |
| 139 | + Petroleum: 'petroleum', |
| 140 | + Water: 'water' |
153 | 141 | }
|
154 | 142 | },
|
155 | 143 | OpenSeaMap: {
|
|
261 | 249 | }
|
262 | 250 | },
|
263 | 251 | MapBox: {
|
264 |
| - url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', |
| 252 | + url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}', |
265 | 253 | options: {
|
266 | 254 | attribution:
|
267 | 255 | 'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> — ' +
|
|
272 | 260 | }
|
273 | 261 | },
|
274 | 262 | Stamen: {
|
275 |
| - url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}', |
| 263 | + url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.{ext}', |
276 | 264 | options: {
|
277 | 265 | attribution:
|
278 | 266 | 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
|
|
292 | 280 | TonerLabels: 'toner-labels',
|
293 | 281 | TonerLite: 'toner-lite',
|
294 | 282 | Watercolor: {
|
| 283 | + url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}', |
295 | 284 | options: {
|
296 | 285 | variant: 'watercolor',
|
297 | 286 | minZoom: 1,
|
|
313 | 302 | }
|
314 | 303 | },
|
315 | 304 | TopOSMRelief: {
|
| 305 | + url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}', |
316 | 306 | options: {
|
317 | 307 | variant: 'toposm-color-relief',
|
318 | 308 | ext: 'jpg',
|
|
475 | 465 | normalNightMobile: 'normal.night.mobile',
|
476 | 466 | normalNightGrey: 'normal.night.grey',
|
477 | 467 | normalNightGreyMobile: 'normal.night.grey.mobile',
|
478 |
| - |
| 468 | + normalNightTransit: 'normal.night.transit', |
| 469 | + normalNightTransitMobile: 'normal.night.transit.mobile', |
| 470 | + redcuedDay: 'reduced.day', |
| 471 | + redcuedNight: 'reduced.night', |
479 | 472 | basicMap: {
|
480 | 473 | options: {
|
481 | 474 | type: 'basetile'
|
|
506 | 499 | variant: 'hybrid.day.mobile'
|
507 | 500 | }
|
508 | 501 | },
|
| 502 | + hybridDayTransit: { |
| 503 | + options: { |
| 504 | + base: 'aerial', |
| 505 | + variant: 'hybrid.day.transit' |
| 506 | + } |
| 507 | + }, |
| 508 | + hybridDayGrey: { |
| 509 | + options: { |
| 510 | + base: 'aerial', |
| 511 | + variant: 'hybrid.grey.day' |
| 512 | + } |
| 513 | + }, |
509 | 514 | pedestrianDay: 'pedestrian.day',
|
510 | 515 | pedestrianNight: 'pedestrian.night',
|
511 | 516 | satelliteDay: {
|
|
547 | 552 | }
|
548 | 553 | },
|
549 | 554 | CartoDB: {
|
550 |
| - url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/{variant}/{z}/{x}/{y}.png', |
| 555 | + url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.png', |
551 | 556 | options: {
|
552 | 557 | attribution: '{attribution.OpenStreetMap} © <a href="http://cartodb.com/attributions">CartoDB</a>',
|
553 | 558 | subdomains: 'abcd',
|
|
560 | 565 | PositronOnlyLabels: 'light_only_labels',
|
561 | 566 | DarkMatter: 'dark_all',
|
562 | 567 | DarkMatterNoLabels: 'dark_nolabels',
|
563 |
| - DarkMatterOnlyLabels: 'dark_only_labels' |
| 568 | + DarkMatterOnlyLabels: 'dark_only_labels', |
| 569 | + Voyager: 'rastertiles/voyager', |
| 570 | + VoyagerNoLabels: 'rastertiles/voyager_nolabels', |
| 571 | + VoyagerOnlyLabels: 'rastertiles/voyager_only_labels', |
| 572 | + VoyagerLabelsUnder: 'rastertiles/voyager_labels_under' |
564 | 573 | }
|
565 | 574 | },
|
566 | 575 | HikeBike: {
|
|
730 | 739 | }
|
731 | 740 | },
|
732 | 741 | Wikimedia: {
|
733 |
| - url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png', |
| 742 | + url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png', |
734 | 743 | options: {
|
735 | 744 | attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
|
736 | 745 | minZoom: 1,
|
737 |
| - maxZoom: 18 |
| 746 | + maxZoom: 19 |
| 747 | + } |
| 748 | + }, |
| 749 | + GeoportailFrance: { |
| 750 | + url: 'https://wxs.ign.fr/{apikey}/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}', |
| 751 | + options: { |
| 752 | + attribution: '<a target="_blank" href="https://www.geoportail.gouv.fr/">Geoportail France</a>', |
| 753 | + bounds: [[-75, -180], [81, 180]], |
| 754 | + minZoom: 2, |
| 755 | + maxZoom: 18, |
| 756 | + // Get your own geoportail apikey here : http://professionnels.ign.fr/ign/contrats/ |
| 757 | + // NB : 'choisirgeoportail' is a demonstration key that comes with no guarantee |
| 758 | + apikey: 'choisirgeoportail', |
| 759 | + format: 'image/jpeg', |
| 760 | + style : 'normal', |
| 761 | + variant: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD' |
| 762 | + }, |
| 763 | + variants: { |
| 764 | + parcels: { |
| 765 | + options : { |
| 766 | + variant: 'CADASTRALPARCELS.PARCELS', |
| 767 | + maxZoom: 20, |
| 768 | + style : 'bdparcellaire', |
| 769 | + format: 'image/png' |
| 770 | + } |
| 771 | + }, |
| 772 | + ignMaps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS', |
| 773 | + maps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD', |
| 774 | + orthos: { |
| 775 | + options: { |
| 776 | + maxZoom: 19, |
| 777 | + variant: 'ORTHOIMAGERY.ORTHOPHOTOS' |
| 778 | + } |
| 779 | + } |
| 780 | + } |
| 781 | + }, |
| 782 | + OneMapSG: { |
| 783 | + url: '//maps-{s}.onemap.sg/v3/{variant}/{z}/{x}/{y}.png', |
| 784 | + options: { |
| 785 | + variant: 'Default', |
| 786 | + minZoom: 11, |
| 787 | + maxZoom: 18, |
| 788 | + bounds: [[1.56073, 104.11475], [1.16, 103.502]], |
| 789 | + attribution: 'New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>' |
| 790 | + }, |
| 791 | + variants: { |
| 792 | + Default: 'Default', |
| 793 | + Night: 'Night', |
| 794 | + Original: 'Original', |
| 795 | + Grey: 'Grey', |
| 796 | + LandLot: 'LandLot' |
738 | 797 | }
|
739 | 798 | }
|
740 | 799 | };
|
|
0 commit comments