pigeon-maps
Advanced tools
Comparing version 0.19.2 to 0.19.3
@@ -10,3 +10,3 @@ # Change Log | ||
## 0.19.2 - 2021-03-20 | ||
## 0.19.3 - 2021-03-20 | ||
### Changes | ||
@@ -13,0 +13,0 @@ - Add `maptiler` to providers |
@@ -21,7 +21,3 @@ 'use strict'; | ||
return function (x, y, z, dpr) { | ||
if (dpr > 1) { | ||
return "https://api.maptiler.com/maps/" + map + "/" + z + "/" + x + "/" + y + ".png?key=" + apiKey; | ||
} else { | ||
return "https://api.maptiler.com/maps/" + map + "/256/" + z + "/" + x + "/" + y + ".png?key=" + apiKey; | ||
} | ||
return "https://api.maptiler.com/maps/" + map + "/256/" + z + "/" + x + "/" + y + (dpr >= 2 ? '@2x' : '') + ".png?key=" + apiKey; | ||
}; | ||
@@ -28,0 +24,0 @@ }; |
@@ -17,7 +17,3 @@ function osm(x, y, z) { | ||
return function (x, y, z, dpr) { | ||
if (dpr > 1) { | ||
return "https://api.maptiler.com/maps/" + map + "/" + z + "/" + x + "/" + y + ".png?key=" + apiKey; | ||
} else { | ||
return "https://api.maptiler.com/maps/" + map + "/256/" + z + "/" + x + "/" + y + ".png?key=" + apiKey; | ||
} | ||
return "https://api.maptiler.com/maps/" + map + "/256/" + z + "/" + x + "/" + y + (dpr >= 2 ? '@2x' : '') + ".png?key=" + apiKey; | ||
}; | ||
@@ -24,0 +20,0 @@ }; |
{ | ||
"name": "pigeon-maps", | ||
"version": "0.19.2", | ||
"version": "0.19.3", | ||
"description": "ReactJS maps without external dependencies", | ||
@@ -5,0 +5,0 @@ "author": "Marius Andra", |
@@ -15,7 +15,3 @@ export function osm(x: number, y: number, z: number): string { | ||
export const maptiler = (apiKey: string, map = 'streets') => (x: number, y: number, z: number, dpr: number): string => { | ||
if (dpr > 1) { | ||
return `https://api.maptiler.com/maps/${map}/${z}/${x}/${y}.png?key=${apiKey}` | ||
} else { | ||
return `https://api.maptiler.com/maps/${map}/256/${z}/${x}/${y}.png?key=${apiKey}` | ||
} | ||
return `https://api.maptiler.com/maps/${map}/256/${z}/${x}/${y}${dpr >= 2 ? '@2x' : ''}.png?key=${apiKey}` | ||
} |
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
211062
4939