slippy-tile
Advanced tools
Comparing version 1.13.0 to 1.13.1
@@ -6,3 +6,3 @@ | ||
- Add Toporama WMS as provider (French & English) | ||
- Add Toporama WMS as provider (English & French "not working") | ||
@@ -9,0 +9,0 @@ ## 1.12.0 - 2017-03-15 |
@@ -241,3 +241,3 @@ (function (global, factory) { | ||
var en = { | ||
name: 'Toporama English', | ||
name: 'Toporama', | ||
categories: [ | ||
@@ -258,22 +258,21 @@ 'toporama', | ||
var fr = { | ||
name: 'Toporama French', | ||
categories: [ | ||
'toporama', | ||
'canada', | ||
'topographic', | ||
'francais' | ||
], | ||
minZoom: 1, | ||
maxZoom: 19, | ||
url: 'http://wms.ess-ws.nrcan.gc.ca/wms/toporama_fr?&service=WMS&request=GetMap&layers=WMS-Toporama&format=image/jpeg&transparent=false&version=1.1.1&height={height}&width={width}&srs={srs}&bbox={bbox}', | ||
description: 'Tiles from Toporama', | ||
attribution: 'Map data Toporama', | ||
format: 'jpeg', | ||
type: 'baselayer' | ||
}; | ||
// module.exports.fr = { | ||
// name: 'Toporama French', | ||
// categories: [ | ||
// 'toporama', | ||
// 'canada', | ||
// 'topographic', | ||
// 'francais' | ||
// ], | ||
// minZoom: 1, | ||
// maxZoom: 19, | ||
// url: 'http://wms.ess-ws.nrcan.gc.ca/wms/toporama_fr?&service=WMS&request=GetMap&layers=WMS-Toporama&format=image/jpeg&transparent=false&version=1.1.1&height={height}&width={width}&srs={srs}&bbox={bbox}', | ||
// description: 'Tiles from Toporama', | ||
// attribution: 'Map data Toporama', | ||
// format: 'jpeg', | ||
// type: 'baselayer' | ||
// } | ||
var toporama = { | ||
en: en, | ||
fr: fr | ||
en: en | ||
}; | ||
@@ -280,0 +279,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):e.slippyTile=r()}(this,function(){function e(e){return e=e||256,2*Math.PI*6378137/e}function r(e){var r=e[0],t=e[1],a=e[2];return(1<<a)*((1<<a)+r)+t}function t(e){var r=e[0],t=e[1],a=e[2],o=e[3],i=(r-a)/2+a,n=(t-o)/2+o;return i=Number(i.toFixed(6)),n=Number(n.toFixed(6)),[i,n]}function a(e,r){e=x(e,r);var t=e[0],a=e[1],o=t*re/180,i=Math.log(Math.tan((90+a)*Math.PI/360))/(Math.PI/180);return i=i*re/180,o=Number(o.toFixed(1)),i=Number(i.toFixed(1)),[o,i]}function o(e){var r=e[0],t=e[1],a=r/re*180,o=t/re*180;return o=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),a=Number(a.toFixed(6)),o=Number(o.toFixed(6)),[a,o]}function i(e,r,t){var a=e[0],o=e[1],i=E(r,t),n=(a+re)/i,s=(o+re)/i;return[n,s,r]}function n(e,r,t){e=x(e,t);var o=a(e),n=i(o,r);return m(n)}function s(e,r,t){if(e=x(e,t),0===r)return[0,0,0];var a=n(e,r);return h(a)}function p(e,r){if(0===r)return[0,0,0];var t=i(e,r);return m(t)}function l(e,r){var t=e[0],a=e[1],o=e[2],i=E(o,r),n=t*i-re,s=a*i-re;return n=Number(n.toFixed(1)),s=Number(s.toFixed(1)),[n,s]}function m(e,r,t){r=r||256;var a=e[0],o=e[1],i=e[2];if(0===i)return[0,0,0];w(i,t);var n=Math.ceil(a/r)-1,s=Math.ceil(o/r)-1;return 0>n&&(n=0),0>s&&(s=0),[n,s,i]}function c(e,r,t){v(e,t),r=r||256;var a=e[0],o=e[1],i=e[2],n=l([a*r,o*r,i]),s=l([(a+1)*r,(o+1)*r,i]);return[n[0],n[1],s[0],s[1]]}function u(e,r){v(e,r);var t=e[0],a=e[1],i=e[2];if(0===i)return[-180,-85.051129,180,85.051129];var n=c([t,a,i]),s=n[0],p=n[1],l=n[2],m=n[3],u=o([s,p,i]),d=o([l,m,i]);return[u[0],u[1],d[0],d[1]]}function d(e){var r=f(e);return c(r)}function g(e){var r=f(e);return u(r)}function h(e,r){v(e,r);var t=e[0],a=e[1],o=e[2];if(0===o)return[0,0,0];var i=t,n=Math.pow(2,o)-1-a;return[i,n,o]}function f(e){var r=e[0],t=e[1],a=e[2],o=r,i=Math.pow(2,a)-t-1;return[o,i,a]}function M(e){var r=f(e);return y(r)}function y(e,r){v(e,r);var t=e[0],a=e[1],o=e[2];if(0===o)return"";var i="";return a=Math.pow(2,o)-1-a,I(o,0,-1).map(function(e){var r=0,o=1<<e-1;0!==(t&o)&&(r+=1),0!==(a&o)&&(r+=2),i=i.concat(r)}),i}function T(e){var r=S(e);return f(r)}function S(e){var r=0,t=0,a=e.length;return I(a,0,-1).map(function(o){var i=1<<o-1;switch(parseInt(e[a-o],0)){case 0:break;case 1:r+=i;break;case 2:t+=i;break;case 3:r+=i,t+=i;break;default:throw new Error("Invalid Quadkey digit sequence")}}),[r,t,a]}function b(e){var r=a([e[0],e[1]]),t=a([e[2],e[3]]);return[r[0],r[1],t[0],t[1]]}function v(e,r){var t=e[0],a=e[1],o=e[2];if(r===!1)return e;if(w(o),void 0===t||null===t)throw new Error("<x> is required");if(void 0===a||null===a)throw new Error("<y> is required");if(0>t)throw new Error("<x> must not be less than 0");if(0>a)throw new Error("<y> must not be less than 0");var i=Math.pow(2,o);if(t>=i||a>=i)throw new Error("Illegal parameters for tile");return e}function w(e){if(e===!1)return e;if(void 0===e||null===e)throw new Error("<zoom> is required");if(0>e)throw new Error("<zoom> cannot be less than 0");if(e>30)throw new Error("<zoom> cannot be greater than 30");return e}function x(e,r){if(r===!1)return e;var t=Z(e[0]),a=N(e[1]);return a>85&&(a=85),-85>t&&(a=-85),[t,a]}function E(r,t){return e(t)/Math.pow(2,r)}function I(e,r,t){null==r&&(r=e||0,e=0),t||(t=e>r?-1:1);for(var a=Math.max(Math.ceil((r-e)/t),0),o=Array(a),i=0;a>i;i++,e+=t)o[i]=e;return o}function G(e){if(e&&e[0]&&4===e.length&&void 0===e[0][0])return e;if(e&&e[0]&&void 0!==e[0][0]){var r=e[0][0],t=e[0][1],a=e[0][2],o=e[0][3];return e.map(function(e){e[0]<r&&(r=e[0]),e[1]<t&&(t=e[1]),e[2]>a&&(a=e[2]),e[3]>o&&(o=e[3])}),[r,t,a,o]}}function N(e){if(null===e||void 0===e)throw new Error("lat is required");return(e>90||-90>e)&&(e%=180,e>90&&(e=-180+e),-90>e&&(e=180+e),e===-0&&(e=0)),e}function Z(e){if(null===e||void 0===e)throw new Error("lng is required");return(e>180||-180>e)&&(e%=360,e>180&&(e=-360+e),-180>e&&(e=360+e),e===-0&&(e=0)),e}function O(e,r){var t=e[0],a=e[1],o=e[2];if(r=C(e,r),r=W(r),r=k(r),r=r.replace(/{(zoom|z|level)}/,String(o)),r=r.replace(/{(x|col)}/,String(t)),r=r.replace(/{(y|row)}/,String(a)),r.match(/{-y}/)&&(r=r.replace(/{-y}/,String(ne(e)[1]))),r.match(/{(quadkey|q)}/)&&(r=r.replace(/{(quadkey|q)}/,se(e))),r.match(/{.*}/))throw new Error("Could not completly parse URL"+r);return r}function C(e,r){r=r.replace(/{height}/gi,"256"),r=r.replace(/{width}/gi,"256"),r=r.replace(/{(proj|srs|crs)}/gi,"EPSG:3857");var t;return t=r.match(/EPSG:(3857|900913)/i)?pe(ie(e)):ie(e),r.match(/{bbox}/i)&&(r=r.replace(/{bbox}/gi,t.join(","))),r}function W(e){return e=e.replace(/{TileCol}/gi,"{x}"),e=e.replace(/{TileRow}/gi,"{y}"),e=e.replace(/{TileMatrix}/gi,"{z}"),e=e.replace(/{TileMatrixSet}/gi,"GoogleMapsCompatible"),e=e.replace(/{Style}/gi,"default")}function k(e){if(e.match(/{s}/))return e.replace(/{s}/gi,String(R(["a","b","c"])));var r=/{switch:([a-z,\d]*)}/,t=e.match(r);return t?e.replace(r,String(R(t[1].split(",")))):e}function R(e){return null===e||void 0===e||0===e.length?void 0:e[Math.floor(Math.random()*e.length)]}var j={name:"ESRI National Geographic World Map",categories:["esri","national","geographic","world"],minZoom:0,maxZoom:12,url:"https://services.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This map is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.",attribution:"National Geographic, Esri, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, INCREMENT P",format:"jpg",type:"baselayer"},A={name:"ESRI Ocean Basemap",categories:["esri","ocean","world"],minZoom:0,maxZoom:10,url:"https://services.arcgisonline.com/arcgis/rest/services/Ocean_Basemap/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"The ocean basemap includes bathymetry, surface and subsurface feature names, and derived depths. This service is designed to be used as a basemap by marine GIS professionals and as a reference map by anyone interested in ocean data.",attribution:"Esri, GEBCO, NOAA, National Geographic, DeLorme, HERE, Geonames.org, and other contributors",format:"jpg",type:"baselayer"},B={name:"ESRI USA Topo Maps",categories:["esri","topo","topographicusa"],minZoom:0,maxZoom:15,url:"https://services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This map service presents detailed USGS topographic maps for the United States at multiple scales.",attribution:"© 2011 National Geographic Society, i-cubed",format:"jpg",type:"baselayer"},_={name:"ESRI World Imagery",categories:["esri","imagery","world"],minZoom:0,maxZoom:19,url:"https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This map service presents satellite imagery for the world and high-resolution imagery for the United States and other areas around the world.",attribution:"Esri, DigitalGlobe, Earthstar Geographics, CNES/Airbus DS, GeoEye, USDA FSA, USGS, Getmapping, Aerogrid, IGN, IGP, and the GIS User Community",format:"jpg",type:"baselayer"},P={name:"ESRI World Street Map",categories:["esri","street","world"],minZoom:0,maxZoom:19,url:"https://services.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer/WMTS/tile/1.0.0/World_Topo_Map/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This map service presents highway-level data for the world and street-level data for North America, Europe, Africa, parts of the Middle East, Asia, and more.",attribution:"Esri, HERE, DeLorme, USGS, Intermap, INCREMENT P, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), MapmyIndia, © OpenStreetMap contributors, and the GIS User Community",format:"jpg",type:"baselayer"},q={name:"ESRI World Topographic Map",categories:["esri","topo","topographic","world"],minZoom:0,maxZoom:19,url:"https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This world topographic map includes boundaries, cities, water features, physiographic features, parks, landmarks, transportation, and buildings.",attribution:"Esri, HERE, DeLorme, Intermap, INCREMENT P, GEBCO, USGS, FAO, NPS, NRCAN, GeoBase, IGN, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), swisstopo, MapmyIndia, © OpenStreetMap contributors, GIS User Community",format:"jpg",type:"baselayer"},U={natgeo:j,ocean:A,usatopo:B,imagery:_,street:P,topo:q},L={name:"Bing Imagery",categories:["bing","imagery","world"],minZoom:1,maxZoom:20,url:"https://ecn.t{switch:0,1,2,3}.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=5250",description:"Tiles from Bing",attribution:"Map data © Bing",format:"jpg",type:"baselayer"},z={imagery:L},F={name:"OpenStreetMap Standard",categories:["openstreetmap","standard","world"],minZoom:0,maxZoom:19,url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},D={name:"OpenStreetMap Cycle Map",categories:["openstreetmap","cycle","world"],minZoom:0,maxZoom:19,url:"https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},H={name:"OpenStreetMap Humanitarian",categories:["openstreetmap","hot","humanitarian","world"],minZoom:0,maxZoom:19,url:"https://tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},Q={name:"OpenStreetMap Transport Map",categories:["openstreetmap","transport","world"],minZoom:0,maxZoom:19,url:"https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},K={name:"OpenStreetMap Wikimedia",categories:["openstreetmap","wikimedia","world"],minZoom:0,maxZoom:19,url:"https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",description:"Tiles from OSM",attribution:"Map data © OSM",format:"png",type:"baselayer"},J={name:"OpenStreetMap Lyrk",categories:["openstreetmap","lyrk","world"],minZoom:0,maxZoom:19,url:"https://tiles.lyrk.org/ls/{z}/{x}/{y}?apikey=6e8cfef737a140e2a58c8122aaa26077",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},V={standard:F,cycle:D,hot:H,transport:Q,wikimedia:K,lyrk:J},X={name:"Toporama English",categories:["toporama","canada","topographic","english"],minZoom:1,maxZoom:19,url:"http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en?&service=WMS&request=GetMap&layers=WMS-Toporama&format=image/jpeg&transparent=false&version=1.1.1&height={height}&width={width}&srs={srs}&bbox={bbox}",description:"Tiles from Toporama",attribution:"Map data Toporama",format:"jpeg",type:"baselayer"},Y={name:"Toporama French",categories:["toporama","canada","topographic","francais"],minZoom:1,maxZoom:19,url:"http://wms.ess-ws.nrcan.gc.ca/wms/toporama_fr?&service=WMS&request=GetMap&layers=WMS-Toporama&format=image/jpeg&transparent=false&version=1.1.1&height={height}&width={width}&srs={srs}&bbox={bbox}",description:"Tiles from Toporama",attribution:"Map data Toporama",format:"jpeg",type:"baselayer"},$={en:X,fr:Y},ee={esri:U,bing:z,openstreetmap:V,toporama:$},re=2*Math.PI*6378137/2,te={hash:r,bboxToCenter:t,lngLatToMeters:a,metersToLngLat:o,metersToPixels:i,lngLatToTile:n,lngLatToGoogle:s,metersToTile:p,pixelsToMeters:l,pixelsToTile:m,tileToBBoxMeters:c,tileToBBox:u,googleToBBoxMeters:d,googleToBBox:g,tileToGoogle:h,googleToTile:f,googleToQuadkey:M,tileToQuadkey:y,quadkeyToTile:T,quadkeyToGoogle:S,bboxToMeters:b,validateTile:v,validateZoom:w,validateLngLat:x,resolution:E,range:I,maxBBox:G,latitude:N,longitude:Z},ae=ee,oe=te,ie=oe.googleToBBox,ne=oe.googleToTile,se=oe.googleToQuadkey,pe=oe.bboxToMeters,le={parse:O,providers:ae,wms:C,wmts:W,parseSwitch:k,sample:R};return le}); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):e.slippyTile=r()}(this,function(){function e(e){return e=e||256,2*Math.PI*6378137/e}function r(e){var r=e[0],t=e[1],a=e[2];return(1<<a)*((1<<a)+r)+t}function t(e){var r=e[0],t=e[1],a=e[2],o=e[3],i=(r-a)/2+a,n=(t-o)/2+o;return i=Number(i.toFixed(6)),n=Number(n.toFixed(6)),[i,n]}function a(e,r){e=x(e,r);var t=e[0],a=e[1],o=t*ee/180,i=Math.log(Math.tan((90+a)*Math.PI/360))/(Math.PI/180);return i=i*ee/180,o=Number(o.toFixed(1)),i=Number(i.toFixed(1)),[o,i]}function o(e){var r=e[0],t=e[1],a=r/ee*180,o=t/ee*180;return o=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),a=Number(a.toFixed(6)),o=Number(o.toFixed(6)),[a,o]}function i(e,r,t){var a=e[0],o=e[1],i=E(r,t),n=(a+ee)/i,s=(o+ee)/i;return[n,s,r]}function n(e,r,t){e=x(e,t);var o=a(e),n=i(o,r);return m(n)}function s(e,r,t){if(e=x(e,t),0===r)return[0,0,0];var a=n(e,r);return h(a)}function p(e,r){if(0===r)return[0,0,0];var t=i(e,r);return m(t)}function l(e,r){var t=e[0],a=e[1],o=e[2],i=E(o,r),n=t*i-ee,s=a*i-ee;return n=Number(n.toFixed(1)),s=Number(s.toFixed(1)),[n,s]}function m(e,r,t){r=r||256;var a=e[0],o=e[1],i=e[2];if(0===i)return[0,0,0];w(i,t);var n=Math.ceil(a/r)-1,s=Math.ceil(o/r)-1;return 0>n&&(n=0),0>s&&(s=0),[n,s,i]}function c(e,r,t){v(e,t),r=r||256;var a=e[0],o=e[1],i=e[2],n=l([a*r,o*r,i]),s=l([(a+1)*r,(o+1)*r,i]);return[n[0],n[1],s[0],s[1]]}function u(e,r){v(e,r);var t=e[0],a=e[1],i=e[2];if(0===i)return[-180,-85.051129,180,85.051129];var n=c([t,a,i]),s=n[0],p=n[1],l=n[2],m=n[3],u=o([s,p,i]),d=o([l,m,i]);return[u[0],u[1],d[0],d[1]]}function d(e){var r=f(e);return c(r)}function g(e){var r=f(e);return u(r)}function h(e,r){v(e,r);var t=e[0],a=e[1],o=e[2];if(0===o)return[0,0,0];var i=t,n=Math.pow(2,o)-1-a;return[i,n,o]}function f(e){var r=e[0],t=e[1],a=e[2],o=r,i=Math.pow(2,a)-t-1;return[o,i,a]}function M(e){var r=f(e);return y(r)}function y(e,r){v(e,r);var t=e[0],a=e[1],o=e[2];if(0===o)return"";var i="";return a=Math.pow(2,o)-1-a,I(o,0,-1).map(function(e){var r=0,o=1<<e-1;0!==(t&o)&&(r+=1),0!==(a&o)&&(r+=2),i=i.concat(r)}),i}function T(e){var r=S(e);return f(r)}function S(e){var r=0,t=0,a=e.length;return I(a,0,-1).map(function(o){var i=1<<o-1;switch(parseInt(e[a-o],0)){case 0:break;case 1:r+=i;break;case 2:t+=i;break;case 3:r+=i,t+=i;break;default:throw new Error("Invalid Quadkey digit sequence")}}),[r,t,a]}function b(e){var r=a([e[0],e[1]]),t=a([e[2],e[3]]);return[r[0],r[1],t[0],t[1]]}function v(e,r){var t=e[0],a=e[1],o=e[2];if(r===!1)return e;if(w(o),void 0===t||null===t)throw new Error("<x> is required");if(void 0===a||null===a)throw new Error("<y> is required");if(0>t)throw new Error("<x> must not be less than 0");if(0>a)throw new Error("<y> must not be less than 0");var i=Math.pow(2,o);if(t>=i||a>=i)throw new Error("Illegal parameters for tile");return e}function w(e){if(e===!1)return e;if(void 0===e||null===e)throw new Error("<zoom> is required");if(0>e)throw new Error("<zoom> cannot be less than 0");if(e>30)throw new Error("<zoom> cannot be greater than 30");return e}function x(e,r){if(r===!1)return e;var t=O(e[0]),a=G(e[1]);return a>85&&(a=85),-85>t&&(a=-85),[t,a]}function E(r,t){return e(t)/Math.pow(2,r)}function I(e,r,t){null==r&&(r=e||0,e=0),t||(t=e>r?-1:1);for(var a=Math.max(Math.ceil((r-e)/t),0),o=Array(a),i=0;a>i;i++,e+=t)o[i]=e;return o}function N(e){if(e&&e[0]&&4===e.length&&void 0===e[0][0])return e;if(e&&e[0]&&void 0!==e[0][0]){var r=e[0][0],t=e[0][1],a=e[0][2],o=e[0][3];return e.map(function(e){e[0]<r&&(r=e[0]),e[1]<t&&(t=e[1]),e[2]>a&&(a=e[2]),e[3]>o&&(o=e[3])}),[r,t,a,o]}}function G(e){if(null===e||void 0===e)throw new Error("lat is required");return(e>90||-90>e)&&(e%=180,e>90&&(e=-180+e),-90>e&&(e=180+e),e===-0&&(e=0)),e}function O(e){if(null===e||void 0===e)throw new Error("lng is required");return(e>180||-180>e)&&(e%=360,e>180&&(e=-360+e),-180>e&&(e=360+e),e===-0&&(e=0)),e}function Z(e,r){var t=e[0],a=e[1],o=e[2];if(r=C(e,r),r=k(r),r=R(r),r=r.replace(/{(zoom|z|level)}/,String(o)),r=r.replace(/{(x|col)}/,String(t)),r=r.replace(/{(y|row)}/,String(a)),r.match(/{-y}/)&&(r=r.replace(/{-y}/,String(ie(e)[1]))),r.match(/{(quadkey|q)}/)&&(r=r.replace(/{(quadkey|q)}/,ne(e))),r.match(/{.*}/))throw new Error("Could not completly parse URL"+r);return r}function C(e,r){r=r.replace(/{height}/gi,"256"),r=r.replace(/{width}/gi,"256"),r=r.replace(/{(proj|srs|crs)}/gi,"EPSG:3857");var t;return t=r.match(/EPSG:(3857|900913)/i)?se(oe(e)):oe(e),r.match(/{bbox}/i)&&(r=r.replace(/{bbox}/gi,t.join(","))),r}function k(e){return e=e.replace(/{TileCol}/gi,"{x}"),e=e.replace(/{TileRow}/gi,"{y}"),e=e.replace(/{TileMatrix}/gi,"{z}"),e=e.replace(/{TileMatrixSet}/gi,"GoogleMapsCompatible"),e=e.replace(/{Style}/gi,"default")}function R(e){if(e.match(/{s}/))return e.replace(/{s}/gi,String(W(["a","b","c"])));var r=/{switch:([a-z,\d]*)}/,t=e.match(r);return t?e.replace(r,String(W(t[1].split(",")))):e}function W(e){return null===e||void 0===e||0===e.length?void 0:e[Math.floor(Math.random()*e.length)]}var A={name:"ESRI National Geographic World Map",categories:["esri","national","geographic","world"],minZoom:0,maxZoom:12,url:"https://services.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This map is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.",attribution:"National Geographic, Esri, DeLorme, HERE, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, INCREMENT P",format:"jpg",type:"baselayer"},B={name:"ESRI Ocean Basemap",categories:["esri","ocean","world"],minZoom:0,maxZoom:10,url:"https://services.arcgisonline.com/arcgis/rest/services/Ocean_Basemap/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"The ocean basemap includes bathymetry, surface and subsurface feature names, and derived depths. This service is designed to be used as a basemap by marine GIS professionals and as a reference map by anyone interested in ocean data.",attribution:"Esri, GEBCO, NOAA, National Geographic, DeLorme, HERE, Geonames.org, and other contributors",format:"jpg",type:"baselayer"},j={name:"ESRI USA Topo Maps",categories:["esri","topo","topographicusa"],minZoom:0,maxZoom:15,url:"https://services.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This map service presents detailed USGS topographic maps for the United States at multiple scales.",attribution:"© 2011 National Geographic Society, i-cubed",format:"jpg",type:"baselayer"},_={name:"ESRI World Imagery",categories:["esri","imagery","world"],minZoom:0,maxZoom:19,url:"https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This map service presents satellite imagery for the world and high-resolution imagery for the United States and other areas around the world.",attribution:"Esri, DigitalGlobe, Earthstar Geographics, CNES/Airbus DS, GeoEye, USDA FSA, USGS, Getmapping, Aerogrid, IGN, IGP, and the GIS User Community",format:"jpg",type:"baselayer"},P={name:"ESRI World Street Map",categories:["esri","street","world"],minZoom:0,maxZoom:19,url:"https://services.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer/WMTS/tile/1.0.0/World_Topo_Map/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This map service presents highway-level data for the world and street-level data for North America, Europe, Africa, parts of the Middle East, Asia, and more.",attribution:"Esri, HERE, DeLorme, USGS, Intermap, INCREMENT P, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), MapmyIndia, © OpenStreetMap contributors, and the GIS User Community",format:"jpg",type:"baselayer"},U={name:"ESRI World Topographic Map",categories:["esri","topo","topographic","world"],minZoom:0,maxZoom:19,url:"https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/WMTS/tile/1.0.0/World_Imagery/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg",description:"This world topographic map includes boundaries, cities, water features, physiographic features, parks, landmarks, transportation, and buildings.",attribution:"Esri, HERE, DeLorme, Intermap, INCREMENT P, GEBCO, USGS, FAO, NPS, NRCAN, GeoBase, IGN, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), swisstopo, MapmyIndia, © OpenStreetMap contributors, GIS User Community",format:"jpg",type:"baselayer"},q={natgeo:A,ocean:B,usatopo:j,imagery:_,street:P,topo:U},L={name:"Bing Imagery",categories:["bing","imagery","world"],minZoom:1,maxZoom:20,url:"https://ecn.t{switch:0,1,2,3}.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=5250",description:"Tiles from Bing",attribution:"Map data © Bing",format:"jpg",type:"baselayer"},z={imagery:L},F={name:"OpenStreetMap Standard",categories:["openstreetmap","standard","world"],minZoom:0,maxZoom:19,url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},D={name:"OpenStreetMap Cycle Map",categories:["openstreetmap","cycle","world"],minZoom:0,maxZoom:19,url:"https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},H={name:"OpenStreetMap Humanitarian",categories:["openstreetmap","hot","humanitarian","world"],minZoom:0,maxZoom:19,url:"https://tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},Q={name:"OpenStreetMap Transport Map",categories:["openstreetmap","transport","world"],minZoom:0,maxZoom:19,url:"https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},K={name:"OpenStreetMap Wikimedia",categories:["openstreetmap","wikimedia","world"],minZoom:0,maxZoom:19,url:"https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",description:"Tiles from OSM",attribution:"Map data © OSM",format:"png",type:"baselayer"},J={name:"OpenStreetMap Lyrk",categories:["openstreetmap","lyrk","world"],minZoom:0,maxZoom:19,url:"https://tiles.lyrk.org/ls/{z}/{x}/{y}?apikey=6e8cfef737a140e2a58c8122aaa26077",description:"Tiles from OpenStreetMap",attribution:"Map data © OpenStreetMap",format:"png",type:"baselayer"},V={standard:F,cycle:D,hot:H,transport:Q,wikimedia:K,lyrk:J},X={name:"Toporama",categories:["toporama","canada","topographic","english"],minZoom:1,maxZoom:19,url:"http://wms.ess-ws.nrcan.gc.ca/wms/toporama_en?&service=WMS&request=GetMap&layers=WMS-Toporama&format=image/jpeg&transparent=false&version=1.1.1&height={height}&width={width}&srs={srs}&bbox={bbox}",description:"Tiles from Toporama",attribution:"Map data Toporama",format:"jpeg",type:"baselayer"},Y={en:X},$={esri:q,bing:z,openstreetmap:V,toporama:Y},ee=2*Math.PI*6378137/2,re={hash:r,bboxToCenter:t,lngLatToMeters:a,metersToLngLat:o,metersToPixels:i,lngLatToTile:n,lngLatToGoogle:s,metersToTile:p,pixelsToMeters:l,pixelsToTile:m,tileToBBoxMeters:c,tileToBBox:u,googleToBBoxMeters:d,googleToBBox:g,tileToGoogle:h,googleToTile:f,googleToQuadkey:M,tileToQuadkey:y,quadkeyToTile:T,quadkeyToGoogle:S,bboxToMeters:b,validateTile:v,validateZoom:w,validateLngLat:x,resolution:E,range:I,maxBBox:N,latitude:G,longitude:O},te=$,ae=re,oe=ae.googleToBBox,ie=ae.googleToTile,ne=ae.googleToQuadkey,se=ae.bboxToMeters,pe={parse:Z,providers:te,wms:C,wmts:k,parseSwitch:R,sample:W};return pe}); |
{ | ||
"name": "slippy-tile", | ||
"version": "1.13.0", | ||
"version": "1.13.1", | ||
"description": "Helps convert Slippy Map url tile schemas", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
module.exports.en = { | ||
name: 'Toporama English', | ||
name: 'Toporama', | ||
categories: [ | ||
@@ -18,17 +18,17 @@ 'toporama', | ||
module.exports.fr = { | ||
name: 'Toporama French', | ||
categories: [ | ||
'toporama', | ||
'canada', | ||
'topographic', | ||
'francais' | ||
], | ||
minZoom: 1, | ||
maxZoom: 19, | ||
url: 'http://wms.ess-ws.nrcan.gc.ca/wms/toporama_fr?&service=WMS&request=GetMap&layers=WMS-Toporama&format=image/jpeg&transparent=false&version=1.1.1&height={height}&width={width}&srs={srs}&bbox={bbox}', | ||
description: 'Tiles from Toporama', | ||
attribution: 'Map data Toporama', | ||
format: 'jpeg', | ||
type: 'baselayer' | ||
} | ||
// module.exports.fr = { | ||
// name: 'Toporama French', | ||
// categories: [ | ||
// 'toporama', | ||
// 'canada', | ||
// 'topographic', | ||
// 'francais' | ||
// ], | ||
// minZoom: 1, | ||
// maxZoom: 19, | ||
// url: 'http://wms.ess-ws.nrcan.gc.ca/wms/toporama_fr?&service=WMS&request=GetMap&layers=WMS-Toporama&format=image/jpeg&transparent=false&version=1.1.1&height={height}&width={width}&srs={srs}&bbox={bbox}', | ||
// description: 'Tiles from Toporama', | ||
// attribution: 'Map data Toporama', | ||
// format: 'jpeg', | ||
// type: 'baselayer' | ||
// } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65798
1401