@mapbox/mapbox-gl-style-spec 14.19.0-beta.2 → 14.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +4 -4
- package/dist/index.es.js.map +1 -1
- package/expression/definitions/distance.ts +4 -4
- package/group_by_layout.ts +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -16156,10 +16156,10 @@ function latFromMercatorY(y) {
|
|
|
16156
16156
|
const y2 = 180 - y * 360;
|
|
16157
16157
|
return 360 / Math.PI * Math.atan(Math.exp(y2 * Math.PI / 180)) - 90;
|
|
16158
16158
|
}
|
|
16159
|
-
function getLngLatPoint(coord, canonical) {
|
|
16159
|
+
function getLngLatPoint(coord, canonical, extent = EXTENT) {
|
|
16160
16160
|
const tilesAtZoom = Math.pow(2, canonical.z);
|
|
16161
|
-
const x = (coord.x /
|
|
16162
|
-
const y = (coord.y /
|
|
16161
|
+
const x = (coord.x / extent + canonical.x) / tilesAtZoom;
|
|
16162
|
+
const y = (coord.y / extent + canonical.y) / tilesAtZoom;
|
|
16163
16163
|
return [
|
|
16164
16164
|
lngFromMercatorX(x),
|
|
16165
16165
|
latFromMercatorY(y)
|
|
@@ -16598,7 +16598,7 @@ class Distance {
|
|
|
16598
16598
|
}
|
|
16599
16599
|
console.warn('Distance Expression: currently only evaluates valid Point/LineString/Polygon geometries.');
|
|
16600
16600
|
} else {
|
|
16601
|
-
console.warn('Distance Expression:
|
|
16601
|
+
console.warn('Distance Expression: requires valid feature and canonical information.');
|
|
16602
16602
|
}
|
|
16603
16603
|
return null;
|
|
16604
16604
|
}
|