mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
3 lines
25 KiB
JavaScript
3 lines
25 KiB
JavaScript
|
|
import*as a from"leaflet";var t="default"in a?a.default:a;var e="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:global;var r={};(function(a,e){"object"===typeof modules&&r?r=e(t):e(L)})(0,(function(a){a.TileLayer.Provider=a.TileLayer.extend({initialize:function(t,r){var o=a.TileLayer.Provider.providers;var i=t.split(".");var n=i[0];var s=i[1];if(!o[n])throw"No such provider ("+n+")";var p={url:o[n].url,options:o[n].options};if(s&&"variants"in o[n]){if(!(s in o[n].variants))throw"No such variant of "+n+" ("+s+")";var m=o[n].variants[s];var l;l="string"===typeof m?{variant:m}:m.options;p={url:m.url||p.url,options:a.Util.extend({},p.options,l)}}var attributionReplacer=function(a){return-1===a.indexOf("{attribution.")?a:a.replace(/\{attribution.(\w*)\}/g,(function(a,t){return attributionReplacer(o[t].options.attribution)}))};p.options.attribution=attributionReplacer(p.options.attribution);var y=a.Util.extend({},p.options,r);a.TileLayer.prototype.initialize.call(this||e,p.url,y)}});a.TileLayer.Provider.providers={OpenStreetMap:{url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},variants:{Mapnik:{},DE:{url:"https://tile.openstreetmap.de/{z}/{x}/{y}.png",options:{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:{maxZoom:20,attribution:"© OpenStreetMap France | {attribution.OpenStreetMap}"}},HOT:{url:"https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",options:{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:{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,.7]]}}}},MapTilesAPI:{url:"https://maptiles.p.rapidapi.com/{variant}/{z}/{x}/{y}.png?rapidapi-key={apikey}",options:{attribution:'© <a href="http://www.maptilesapi.com/">MapTiles API</a>, {attribution.OpenStreetMap}',variant:"en/map/v1",apikey:"<insert your api key here>",maxZoom:19},variants:{OSMEnglish:{options:{variant:"en/map/v1"}},OSMFrancais:{options:{variant:"fr/map/v1"}},OSMEspagnol:{options:{variant:"es/map/v1"}}}},OpenSeaMap:{url:"https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'}},OPNVKarte:{url:"https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png",options:{maxZoom:18,attribution:'Map <a href="https://memomaps.de/">memomaps.de</a> <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, map data {attribution.OpenStreetMap}'}},OpenTopoMap:{url:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:17,attribution:'Map data: {attribution.OpenStreetMap}, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: © <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: © <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: © <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: {attributio
|
||
|
|
|