diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a4cb39..6da7056 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,3 +12,9 @@
- **StyleControl**: update types
- **ImageControl**: add error hint for missing layers
- Update dependencies
+
+## 2.1.0
+
+- Update `@turf` package from alpha version to release version
+- Fix Vite SSR for icons
+- Update dependencies
\ No newline at end of file
diff --git a/packages/compass/package.json b/packages/compass/package.json
index dfac2f5..9094592 100644
--- a/packages/compass/package.json
+++ b/packages/compass/package.json
@@ -1,6 +1,6 @@
{
"name": "@mapbox-controls/compass",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Indicate map direction",
"type": "module",
"main": "./src/index.js",
@@ -8,7 +8,7 @@
"build": "tsc"
},
"dependencies": {
- "@mapbox-controls/helpers": "2.0.0"
+ "@mapbox-controls/helpers": "2.1.0"
},
"devDependencies": {
"@types/mapbox-gl": "3.1.0",
@@ -18,11 +18,14 @@
"mapbox-gl": ">=1.0.0 <4.0.0"
},
"types": "./types/index.d.ts",
- "files": ["src", "types"],
+ "files": [
+ "src",
+ "types"
+ ],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "korywka/mapbox-controls",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/packages/compass/src/icons.js b/packages/compass/src/icons.js
index caa7d83..841adce 100644
--- a/packages/compass/src/icons.js
+++ b/packages/compass/src/icons.js
@@ -1,14 +1,16 @@
import { parseSVG } from '@mapbox-controls/helpers';
-const compass = parseSVG(`
-
-`);
+function compass() {
+ return parseSVG(`
+
+ `);
+}
export const icons = {
compass,
diff --git a/packages/compass/src/index.js b/packages/compass/src/index.js
index 35e9527..9b71c2e 100644
--- a/packages/compass/src/index.js
+++ b/packages/compass/src/index.js
@@ -14,10 +14,10 @@ class CompassControl {
constructor(options = {}) {
this.options = { ...options };
this.container = controlContainer('mapbox-ctrl-compass');
- this.icon = icons.compass;
+ this.icon = icons.compass();
this.button = controlButton({
title: 'Compass',
- icon: icons.compass,
+ icon: this.icon,
onClick: () => this.onControlButtonClick(),
});
}
diff --git a/packages/helpers/package.json b/packages/helpers/package.json
index 2a34b65..92bef8a 100644
--- a/packages/helpers/package.json
+++ b/packages/helpers/package.json
@@ -1,6 +1,6 @@
{
"name": "@mapbox-controls/helpers",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Helpers for mapbox controls",
"type": "module",
"main": "./src/index.js",
@@ -16,11 +16,14 @@
"mapbox-gl": ">=1.0.0 <4.0.0"
},
"types": "./types/index.d.ts",
- "files": ["src", "types"],
+ "files": [
+ "src",
+ "types"
+ ],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "korywka/mapbox-gl-controls",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/packages/image/package.json b/packages/image/package.json
index 0564dc6..5bbf7af 100644
--- a/packages/image/package.json
+++ b/packages/image/package.json
@@ -1,6 +1,6 @@
{
"name": "@mapbox-controls/image",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Move, scale and rotate image on a map",
"type": "module",
"main": "./src/index.js",
@@ -8,15 +8,15 @@
"build": "tsc"
},
"dependencies": {
- "@mapbox-controls/helpers": "2.0.0",
- "@turf/bearing": "7.0.0-alpha.2",
- "@turf/centroid": "7.0.0-alpha.2",
- "@turf/helpers": "7.0.0-alpha.2",
- "@turf/rhumb-bearing": "7.0.0-alpha.2",
- "@turf/rhumb-distance": "7.0.0-alpha.2",
- "@turf/transform-rotate": "7.0.0-alpha.2",
- "@turf/transform-scale": "7.0.0-alpha.2",
- "@turf/transform-translate": "7.0.0-alpha.2"
+ "@mapbox-controls/helpers": "2.1.0",
+ "@turf/bearing": "7.0.0",
+ "@turf/centroid": "7.0.0",
+ "@turf/helpers": "7.0.0",
+ "@turf/rhumb-bearing": "7.0.0",
+ "@turf/rhumb-distance": "7.0.0",
+ "@turf/transform-rotate": "7.0.0",
+ "@turf/transform-scale": "7.0.0",
+ "@turf/transform-translate": "7.0.0"
},
"devDependencies": {
"@types/geojson": "7946.0.14",
@@ -27,11 +27,14 @@
"mapbox-gl": ">=1.0.0 <4.0.0"
},
"types": "./types/index.d.ts",
- "files": ["src", "types"],
+ "files": [
+ "src",
+ "types"
+ ],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "korywka/mapbox-controls",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/packages/image/src/icons.js b/packages/image/src/icons.js
index 1f259e9..46b8ea1 100644
--- a/packages/image/src/icons.js
+++ b/packages/image/src/icons.js
@@ -1,38 +1,48 @@
import { parseSVG } from '@mapbox-controls/helpers';
-const image = parseSVG(`
-
-`);
+function image() {
+ return parseSVG(`
+
+ `);
+}
-const move = parseSVG(`
-
-`);
+function move() {
+ return parseSVG(`
+
+ `);
+}
-const scale = parseSVG(`
-
-`);
+function scale() {
+ return parseSVG(`
+
+ `);
+}
-const rotate = parseSVG(`
-
-`);
+function rotate() {
+ return parseSVG(`
+
+ `);
+}
-const remove = parseSVG(`
-
-`);
+function remove() {
+ return parseSVG(`
+
+ `);
+}
export const icons = {
move,
diff --git a/packages/image/src/index.js b/packages/image/src/index.js
index 8628a93..e8c9f90 100644
--- a/packages/image/src/index.js
+++ b/packages/image/src/index.js
@@ -20,33 +20,33 @@ class ImageControl {
this.fileInput = createFileInput();
this.buttonAdd = controlButton({
title: 'Add image',
- icon: icons.image,
+ icon: icons.image(),
className: 'mapbox-ctrl-image-add',
onClick: () => this.fileInput.click(),
});
this.buttonMove = controlButton({
disabled: true,
title: 'Move image',
- icon: icons.move,
+ icon: icons.move(),
onClick: () => this.setMode('move'),
});
this.buttonScale = controlButton({
disabled: true,
title: 'Scale image',
- icon: icons.scale,
+ icon: icons.scale(),
onClick: () => this.setMode('scale'),
});
this.buttonRotate = controlButton({
disabled: true,
title: 'Rotate image',
- icon: icons.rotate,
+ icon: icons.rotate(),
onClick: () => this.setMode('rotate'),
});
if (options.removeButton) {
this.buttonRemove = controlButton({
hidden: true,
title: 'Remove image',
- icon: icons.remove,
+ icon: icons.remove(),
onClick: () => this.removeRaster(),
});
}
@@ -220,7 +220,7 @@ class ImageControl {
onMapClick = (event) => {
if (!this.map) throw Error('map is undefined');
const layersId = Object.values(this.rasters).map((i) => i.fillLayer.id);
- // sometimes layers are removed from the map without destroing the control, e.g. style was changed
+ // sometimes layers are removed from the map without destroying the control, e.g. style was changed
const errorLayerId = layersId.find((id) => {
return !this.map?.getLayer(id);
});
diff --git a/packages/inspect/package.json b/packages/inspect/package.json
index 7c279ad..9081fa6 100644
--- a/packages/inspect/package.json
+++ b/packages/inspect/package.json
@@ -1,6 +1,6 @@
{
"name": "@mapbox-controls/inspect",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Debug map style layers and sources",
"type": "module",
"main": "./src/index.js",
@@ -8,7 +8,7 @@
"build": "tsc"
},
"dependencies": {
- "@mapbox-controls/helpers": "2.0.0"
+ "@mapbox-controls/helpers": "2.1.0"
},
"devDependencies": {
"@types/mapbox-gl": "3.1.0",
@@ -18,11 +18,14 @@
"mapbox-gl": ">=1.0.0 <4.0.0"
},
"types": "./types/index.d.ts",
- "files": ["src", "types"],
+ "files": [
+ "src",
+ "types"
+ ],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "korywka/mapbox-gl-controls",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/packages/inspect/src/icons.js b/packages/inspect/src/icons.js
index a54b423..6abb62f 100644
--- a/packages/inspect/src/icons.js
+++ b/packages/inspect/src/icons.js
@@ -1,11 +1,13 @@
import { parseSVG } from '@mapbox-controls/helpers';
-const inspect = parseSVG(`
-
-`);
+function inspect() {
+ return parseSVG(`
+
+ `);
+}
export const icons = {
inspect,
diff --git a/packages/inspect/src/index.js b/packages/inspect/src/index.js
index 759dc07..bf2fb35 100644
--- a/packages/inspect/src/index.js
+++ b/packages/inspect/src/index.js
@@ -15,7 +15,7 @@ export default class InspectControl {
this.container = controlContainer('mapbox-ctrl-inspect');
this.button = controlButton({
title: 'Inspect',
- icon: icons.inspect,
+ icon: icons.inspect(),
onClick: () => this.onControlButtonClick(),
});
this.isActive = false;
diff --git a/packages/language/package.json b/packages/language/package.json
index 267c0dc..82b1599 100644
--- a/packages/language/package.json
+++ b/packages/language/package.json
@@ -1,6 +1,6 @@
{
"name": "@mapbox-controls/language",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Change map language",
"type": "module",
"main": "./src/index.js",
@@ -15,11 +15,14 @@
"mapbox-gl": ">=1.0.0 <4.0.0"
},
"types": "./types/index.d.ts",
- "files": ["src", "types"],
+ "files": [
+ "src",
+ "types"
+ ],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "korywka/mapbox-controls",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/packages/ruler/package.json b/packages/ruler/package.json
index f45db7b..cf02996 100644
--- a/packages/ruler/package.json
+++ b/packages/ruler/package.json
@@ -1,6 +1,6 @@
{
"name": "@mapbox-controls/ruler",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Measure distance between points on a map",
"type": "module",
"main": "./src/index.js",
@@ -8,9 +8,9 @@
"build": "tsc"
},
"dependencies": {
- "@mapbox-controls/helpers": "2.0.0",
- "@turf/distance": "7.0.0-alpha.2",
- "@turf/helpers": "7.0.0-alpha.2"
+ "@mapbox-controls/helpers": "2.1.0",
+ "@turf/distance": "7.0.0",
+ "@turf/helpers": "7.0.0"
},
"devDependencies": {
"@types/geojson": "7946.0.14",
@@ -21,11 +21,14 @@
"mapbox-gl": ">=1.0.0 <4.0.0"
},
"types": "./types/index.d.ts",
- "files": ["src", "types"],
+ "files": [
+ "src",
+ "types"
+ ],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "korywka/mapbox-gl-controls",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/packages/ruler/src/icons.js b/packages/ruler/src/icons.js
index a3050b2..6347a36 100644
--- a/packages/ruler/src/icons.js
+++ b/packages/ruler/src/icons.js
@@ -1,11 +1,13 @@
import { parseSVG } from '@mapbox-controls/helpers';
-const ruler = parseSVG(`
-
-`);
+function ruler() {
+ return parseSVG(`
+
+ `);
+}
export const icons = {
ruler,
diff --git a/packages/ruler/src/index.js b/packages/ruler/src/index.js
index f375cc3..a51f8d6 100644
--- a/packages/ruler/src/index.js
+++ b/packages/ruler/src/index.js
@@ -34,7 +34,7 @@ export default class RulerControl {
if (!this.options.invisible) {
this.button = controlButton({
title: 'Ruler',
- icon: icons.ruler,
+ icon: icons.ruler(),
onClick: () => this.onControlButtonClick(),
});
}
@@ -188,7 +188,7 @@ export default class RulerControl {
/** @param {MapLayerMouseEvent | MapLayerTouchEvent} event */
function onStart(event) {
- // do not block multitouch actions
+ // do not block multi-touch actions
if (event.type === 'touchstart' && event.points.length !== 1) {
return;
}
diff --git a/packages/styles/package.json b/packages/styles/package.json
index 3b1c1ff..f047a64 100644
--- a/packages/styles/package.json
+++ b/packages/styles/package.json
@@ -1,6 +1,6 @@
{
"name": "@mapbox-controls/styles",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Change map style",
"type": "module",
"main": "./src/index.js",
@@ -8,7 +8,7 @@
"build": "tsc"
},
"dependencies": {
- "@mapbox-controls/helpers": "2.0.0"
+ "@mapbox-controls/helpers": "2.1.0"
},
"devDependencies": {
"@types/mapbox-gl": "3.1.0",
@@ -18,11 +18,14 @@
"mapbox-gl": ">=1.0.0 <4.0.0"
},
"types": "./types/index.d.ts",
- "files": ["src", "types"],
+ "files": [
+ "src",
+ "types"
+ ],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "korywka/mapbox-controls",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/packages/styles/src/icons.js b/packages/styles/src/icons.js
index 69846d0..364a16d 100644
--- a/packages/styles/src/icons.js
+++ b/packages/styles/src/icons.js
@@ -1,10 +1,12 @@
import { parseSVG } from '@mapbox-controls/helpers';
-const layers = parseSVG(`
-
-`);
+function layers() {
+ return parseSVG(`
+
+ `);
+}
export const icons = {
layers,
diff --git a/packages/styles/src/index.js b/packages/styles/src/index.js
index 8ff4992..170088e 100644
--- a/packages/styles/src/index.js
+++ b/packages/styles/src/index.js
@@ -95,7 +95,7 @@ export default class StylesControl {
compact() {
if (!this.map) throw Error('map is undefined');
- const button = controlButton({ title: 'Styles', icon: icons.layers });
+ const button = controlButton({ title: 'Styles', icon: icons.layers() });
const select = document.createElement('select');
this.container.appendChild(button);
button.appendChild(select);
diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json
index ee45a84..e7b41a8 100644
--- a/packages/tooltip/package.json
+++ b/packages/tooltip/package.json
@@ -1,6 +1,6 @@
{
"name": "@mapbox-controls/tooltip",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Display tooltip on hover",
"type": "module",
"main": "./src/index.js",
@@ -15,11 +15,14 @@
"mapbox-gl": ">=1.0.0 <4.0.0"
},
"types": "./types/index.d.ts",
- "files": ["src", "types"],
+ "files": [
+ "src",
+ "types"
+ ],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "korywka/mapbox-gl-controls",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/packages/zoom/package.json b/packages/zoom/package.json
index 2d9875f..e734a29 100644
--- a/packages/zoom/package.json
+++ b/packages/zoom/package.json
@@ -1,6 +1,6 @@
{
"name": "@mapbox-controls/zoom",
- "version": "2.0.0",
+ "version": "2.1.0",
"description": "Zoom in and zoom out map",
"type": "module",
"main": "./src/index.js",
@@ -8,7 +8,7 @@
"build": "tsc"
},
"dependencies": {
- "@mapbox-controls/helpers": "2.0.0"
+ "@mapbox-controls/helpers": "2.1.0"
},
"devDependencies": {
"@types/mapbox-gl": "3.1.0",
@@ -18,11 +18,14 @@
"mapbox-gl": ">=1.0.0 <4.0.0"
},
"types": "./types/index.d.ts",
- "files": ["src", "types"],
+ "files": [
+ "src",
+ "types"
+ ],
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"repository": "korywka/mapbox-controls",
"license": "MIT"
-}
+}
\ No newline at end of file
diff --git a/packages/zoom/src/icons.js b/packages/zoom/src/icons.js
index 215cba1..170c15b 100644
--- a/packages/zoom/src/icons.js
+++ b/packages/zoom/src/icons.js
@@ -1,18 +1,22 @@
import { parseSVG } from '@mapbox-controls/helpers';
-const plus = parseSVG(`
-
-`);
+function plus() {
+ return parseSVG(`
+
+ `);
+}
-const minus = parseSVG(`
-
-`);
+function minus() {
+ return parseSVG(`
+
+ `);
+}
export const icons = {
plus,
diff --git a/packages/zoom/src/index.js b/packages/zoom/src/index.js
index 38df6ec..ffc55e9 100644
--- a/packages/zoom/src/index.js
+++ b/packages/zoom/src/index.js
@@ -6,12 +6,12 @@ class ZoomControl {
this.container = controlContainer('mapbox-ctrl-zoom');
this.buttonIn = controlButton({
title: 'Zoom In',
- icon: icons.plus,
+ icon: icons.plus(),
onClick: () => this.map?.zoomIn(),
});
this.buttonOut = controlButton({
title: 'Zoom Out',
- icon: icons.minus,
+ icon: icons.minus(),
onClick: () => this.map?.zoomOut(),
});
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 614738f..9bbc69a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -24,8 +24,8 @@ importers:
packages/compass:
dependencies:
'@mapbox-controls/helpers':
- specifier: 2.0.0
- version: 2.0.0(mapbox-gl@3.4.0)
+ specifier: 2.1.0
+ version: 2.1.0(mapbox-gl@3.4.0)
devDependencies:
'@types/mapbox-gl':
specifier: 3.1.0
@@ -49,32 +49,32 @@ importers:
packages/image:
dependencies:
'@mapbox-controls/helpers':
- specifier: 2.0.0
- version: 2.0.0(mapbox-gl@3.4.0)
+ specifier: 2.1.0
+ version: 2.1.0(mapbox-gl@3.4.0)
'@turf/bearing':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
'@turf/centroid':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
'@turf/helpers':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
'@turf/rhumb-bearing':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
'@turf/rhumb-distance':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
'@turf/transform-rotate':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
'@turf/transform-scale':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
'@turf/transform-translate':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
devDependencies:
'@types/geojson':
specifier: 7946.0.14
@@ -89,8 +89,8 @@ importers:
packages/inspect:
dependencies:
'@mapbox-controls/helpers':
- specifier: 2.0.0
- version: 2.0.0(mapbox-gl@3.4.0)
+ specifier: 2.1.0
+ version: 2.1.0(mapbox-gl@3.4.0)
devDependencies:
'@types/mapbox-gl':
specifier: 3.1.0
@@ -111,14 +111,14 @@ importers:
packages/ruler:
dependencies:
'@mapbox-controls/helpers':
- specifier: 2.0.0
- version: 2.0.0(mapbox-gl@3.4.0)
+ specifier: 2.1.0
+ version: 2.1.0(mapbox-gl@3.4.0)
'@turf/distance':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
'@turf/helpers':
- specifier: 7.0.0-alpha.2
- version: 7.0.0-alpha.2
+ specifier: 7.0.0
+ version: 7.0.0
devDependencies:
'@types/geojson':
specifier: 7946.0.14
@@ -133,8 +133,8 @@ importers:
packages/styles:
dependencies:
'@mapbox-controls/helpers':
- specifier: 2.0.0
- version: 2.0.0(mapbox-gl@3.4.0)
+ specifier: 2.1.0
+ version: 2.1.0(mapbox-gl@3.4.0)
devDependencies:
'@types/mapbox-gl':
specifier: 3.1.0
@@ -155,8 +155,8 @@ importers:
packages/zoom:
dependencies:
'@mapbox-controls/helpers':
- specifier: 2.0.0
- version: 2.0.0(mapbox-gl@3.4.0)
+ specifier: 2.1.0
+ version: 2.1.0(mapbox-gl@3.4.0)
devDependencies:
'@types/mapbox-gl':
specifier: 3.1.0
@@ -196,8 +196,8 @@ importers:
version: 3.4.0
devDependencies:
'@rollup/plugin-commonjs':
- specifier: 25.0.8
- version: 25.0.8(rollup@4.18.0)
+ specifier: 26.0.1
+ version: 26.0.1(rollup@4.18.0)
'@rollup/plugin-node-resolve':
specifier: 15.2.3
version: 15.2.3(rollup@4.18.0)
@@ -252,11 +252,15 @@ packages:
'@humanwhocodes/object-schema@2.0.3':
resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==}
+ '@isaacs/cliui@8.0.2':
+ resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
+ engines: {node: '>=12'}
+
'@jridgewell/sourcemap-codec@1.4.15':
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
- '@mapbox-controls/helpers@2.0.0':
- resolution: {integrity: sha512-9ShgOREyPbiPVYK5Wm+u5oyK8rOHVMkpWzz4/b/l3m0puwjALx4ysSy+Uz4dRwrRuJrunNz2bUfHTot7H4J1Rw==}
+ '@mapbox-controls/helpers@2.1.0':
+ resolution: {integrity: sha512-JfkPZWLvLKQJlz1y4YKb9WJ2hjdMhrBho10vf7+JnVOBRxY7qHJB7eTFnSrgPCq6lykAUDlShmmcBuw41DzwVw==}
peerDependencies:
mapbox-gl: '>=1.0.0 <4.0.0'
@@ -295,9 +299,13 @@ packages:
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
engines: {node: '>= 8'}
- '@rollup/plugin-commonjs@25.0.8':
- resolution: {integrity: sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==}
- engines: {node: '>=14.0.0'}
+ '@pkgjs/parseargs@0.11.0':
+ resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
+ engines: {node: '>=14'}
+
+ '@rollup/plugin-commonjs@26.0.1':
+ resolution: {integrity: sha512-UnsKoZK6/aGIH6AdkptXhNvhaqftcjq3zZdT+LY5Ftms6JR06nADcDsYp5hTU9E2lbJUEOhdlY5J4DNTneM+jQ==}
+ engines: {node: '>=16.0.0 || 14 >= 14.17'}
peerDependencies:
rollup: ^2.68.0||^3.0.0||^4.0.0
peerDependenciesMeta:
@@ -411,53 +419,50 @@ packages:
cpu: [x64]
os: [win32]
- '@turf/bbox@7.0.0-alpha.116':
- resolution: {integrity: sha512-ad87qitlt9LLDMxI5v55plaGZPvR0WCnM9V9nRVFfrzLo9d56gvQfC/7mZBb9k1JlYz9hB2p2M9L3rklLi392w==}
-
- '@turf/bearing@7.0.0-alpha.2':
- resolution: {integrity: sha512-vX+lzYIvoRDOAzRfBMTo1w0WBEF/57EYA4MmTnq+ZQhgDxnE5ShIlKOIs4BSGO3Ai/eSeNiG/w1uT+tLJtGRmg==}
+ '@turf/bbox@7.0.0':
+ resolution: {integrity: sha512-IyXG5HAsn6IZLdAtQo7aWYccjU5WsV+uzIzhGaXrh/qTVylSYmRiWgLdiekHZVED9nv9r7D/EJUMOT4zyA6POA==}
- '@turf/center@7.0.0-alpha.116':
- resolution: {integrity: sha512-vjPwTRU2U4XmfwKJsRkJ0rX+t5cAM63xssXaLweP+9614lgJG1574vWd/PCfZAqb6pvc9trdH1ge+0cU5Nbq7g==}
+ '@turf/bearing@7.0.0':
+ resolution: {integrity: sha512-r6eBNqqiC8OtW+xIzu0ZyciAUfM85l2LVN2qpTeEyhnaNmnPw7hDsnqwZcbqoBFSLB66MO+BLH40X5OdaoRmmA==}
- '@turf/centroid@7.0.0-alpha.2':
- resolution: {integrity: sha512-FPLK4jAgOr3S9txI2/hilAvVz59f/mr2ixkIohFf/+XBFvjakhNZAsSkNSL1GJeIgJWQTsg5HBS7H5ZI54JoDA==}
+ '@turf/center@7.0.0':
+ resolution: {integrity: sha512-5RZia9uuWxz2oCyd1vsNkBeraBNdwCsIo4UGRQdyswBeLFVbRwIUa7M7+2z2D7B1YIgovuLIRVfk6FeWUQXDtQ==}
- '@turf/clone@7.0.0-alpha.116':
- resolution: {integrity: sha512-27MOaS/42dVCQF3NRFQZAh5u5DXFo1X+9DcKARoFlmiDaCEwMDxOqM7s9KrAdg9pz61KI5ijnrbDXd6lsLGHIw==}
+ '@turf/centroid@7.0.0':
+ resolution: {integrity: sha512-TMKp5yadglNVRxX3xuk1qQDEy5JFHmlYVBamzXuD8DL8rYdVog2x4gQHrwn7xrUyAlKJ4fUZZPkYBWfW6TDWbw==}
- '@turf/distance@7.0.0-alpha.2':
- resolution: {integrity: sha512-x4qwTcD452YAVK74QA13k9wWb78vF+IkU4x5SzaHozHIifHA2W+KDy5Wr5zIrDATY+qrTH34ppDhH7lYk1NZ+Q==}
+ '@turf/clone@7.0.0':
+ resolution: {integrity: sha512-bQBx/wbQoGNtZzuHetLt44NMqOCnjSXcvTWm+LJ7YTmwrqZVAjISDhFxgawY/L+G3p+ya5WoxQwZWak80uYg3A==}
- '@turf/helpers@7.0.0-alpha.116':
- resolution: {integrity: sha512-lBgYicZrgX0s/TqTmE5AjsLSqEgI5dsNwBp6O9xaTNVBoPz/vIbaaB9R/sepCL5pLW1BHDWBswVSTUPYSoHCrQ==}
+ '@turf/distance@7.0.0':
+ resolution: {integrity: sha512-DBPKhHABpPZ0KRduRpEaoi8MB6r1DVuyyps68VFH2Qi5H0ZnFtJFj7nQxBPZR3bVpbUq4zzu7I+MiNAd3ujFWQ==}
- '@turf/helpers@7.0.0-alpha.2':
- resolution: {integrity: sha512-AuN4uqcLw7uZOc0XspEDZsVBeeKMZX+eqAWwfA2hapczX6yBxHdeVM074SmWgMbYkG18UNqk70gNXBz4KIowog==}
+ '@turf/helpers@7.0.0':
+ resolution: {integrity: sha512-vwZvxRuyjGpGXvhXSbT9mX6FK92dBMLWbMbDJ/MXQUPx17ReVPFc+6N6IcxAzZfkiCnqy7vpuq0c+/TTrQxIiA==}
- '@turf/invariant@7.0.0-alpha.116':
- resolution: {integrity: sha512-VoUIaW5wjhkPVPniiAR19A8KJXb350iHRo+KAN4VMOlY21x0ibvNc1aa7s/fKzfWfhkG0u63yDbuS2j/bNtdIQ==}
+ '@turf/invariant@7.0.0':
+ resolution: {integrity: sha512-Kayszfz3W8yJ1/cIA3/aNSzAuw7QgSp+IwsSmhLAfp4DbjV0o6sjxRZXRY2gRstZHqkNHSSEeir8V/icdO8sjA==}
- '@turf/meta@7.0.0-alpha.116':
- resolution: {integrity: sha512-wFOMWBN65Zhf8YcIiLMtd0mxv1lFRjeKeTNNzXSzNms46hcaOkQHvc3PhQR3mydB9HYPhDK0ivbFcJR6sGTl7Q==}
+ '@turf/meta@7.0.0':
+ resolution: {integrity: sha512-cEXr13uFwhXq5mFBy0IK1U/QepE5qgk3zXpBYsla3lYV7cB83Vh+NNUR+r0/w/QoJqest1TG4H20F9tGYWPi/g==}
- '@turf/rhumb-bearing@7.0.0-alpha.2':
- resolution: {integrity: sha512-h+eTeR+7Fsq1DFNFTcluOC/QcL7VnWSYhbU0f0UkBCCooFmGej0KvdvTv9PbtcMm104YRuFhcJq+pkt7HtC2EQ==}
+ '@turf/rhumb-bearing@7.0.0':
+ resolution: {integrity: sha512-4qDggFDNBbWdD+o3H+vna5eiKCAsmqAueP3T5rSEB1ier77wVgjg7cs7eTrEBbpuCbPAho7NDNdyAjgItydgLQ==}
- '@turf/rhumb-destination@7.0.0-alpha.116':
- resolution: {integrity: sha512-7Ph+5c/KMzGHv0vNAemP3/k5AGFAGS/LcpEncmDz9JOrcqRIJKBCyUDZDdNPMvq/milUV+72o26DairHjJghVA==}
+ '@turf/rhumb-destination@7.0.0':
+ resolution: {integrity: sha512-uYgqP8BGo8DBs6ZgjBo9SNCXc6BY+iA6OG7yPYSe4Lur2vu+LkbBXV6P3IodkeHyPex+X5ATea8QHutYQX6HUg==}
- '@turf/rhumb-distance@7.0.0-alpha.2':
- resolution: {integrity: sha512-sXBmT01zDmDGP8iLOuklrumLZC2zwv+P41hZ8webd+fRRPSV701bPIinwuDgKNz+jKOERqWdCRYk3KQiCyY5zg==}
+ '@turf/rhumb-distance@7.0.0':
+ resolution: {integrity: sha512-VAZnZcHbHHUU/Li0sj50/T6bBGRWvJ6eOZmw2aZFxxnC+AkHv4LTKDf0wNsxR03ZwGEh4uJM8OuirNugLIhAyA==}
- '@turf/transform-rotate@7.0.0-alpha.2':
- resolution: {integrity: sha512-NkwXWs0KilMKQGK/b7FjWoICIhMQY/l5L9EkkbqJlcc8KUD9kj2INwn91E/sT2i4cDqs7/bmIUuNTR8SdWPjkQ==}
+ '@turf/transform-rotate@7.0.0':
+ resolution: {integrity: sha512-zU6ypVOdVtXaJvy2LEVjx4o7y/vR9kIL6Iu/VkzXIvGCYICDdHnrpeEVJOFZPqdq4GI4C1xAQ4ARPTwtGrpPBg==}
- '@turf/transform-scale@7.0.0-alpha.2':
- resolution: {integrity: sha512-qBJ7IvXQ7ZP4hM5jz/TsBsQEwtCh4he+kvu8PRkfzTAVcerPm0x/JQW97D72Sov6FVfuplFqG5vCk4wvyiaEWg==}
+ '@turf/transform-scale@7.0.0':
+ resolution: {integrity: sha512-G94nxT5TyP8TSNRDkoevFoGlUw0H2Az5IG1JKFTT5nRqpbML17IQblV33gaA1Hm197rekQo3CDVWEbgpOV0jAw==}
- '@turf/transform-translate@7.0.0-alpha.2':
- resolution: {integrity: sha512-Lnsr+HdthhmrNkcWw9TBIjbZIiUBIE2nldpTNqmL72hl+ufXyT6x35YYMcfvZFqJ8yAfOFRZ6duTtx1RSG5EUA==}
+ '@turf/transform-translate@7.0.0':
+ resolution: {integrity: sha512-sdZl29CqHoBo/Mxwos6Hvb6LXtHJYYTIjlWqphnu1kislbJwWUJpYjwD8yqTljfW4QHgDzGpnRLGzjDVZ7KHQQ==}
'@types/estree@1.0.5':
resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
@@ -790,6 +795,10 @@ packages:
for-each@0.3.3:
resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==}
+ foreground-child@3.2.1:
+ resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==}
+ engines: {node: '>=14'}
+
fs.realpath@1.0.0:
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
@@ -826,15 +835,15 @@ packages:
resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
engines: {node: '>=10.13.0'}
+ glob@10.4.2:
+ resolution: {integrity: sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==}
+ engines: {node: '>=16 || 14 >=14.18'}
+ hasBin: true
+
glob@7.2.3:
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
deprecated: Glob versions prior to v9 are no longer supported
- glob@8.1.0:
- resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==}
- engines: {node: '>=12'}
- deprecated: Glob versions prior to v9 are no longer supported
-
globals@13.24.0:
resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
engines: {node: '>=8'}
@@ -1018,6 +1027,10 @@ packages:
isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
+ jackspeak@3.4.0:
+ resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==}
+ engines: {node: '>=14'}
+
js-yaml@4.1.0:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
hasBin: true
@@ -1057,6 +1070,10 @@ packages:
lodash@4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
+ lru-cache@10.2.2:
+ resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==}
+ engines: {node: 14 || >=16.14}
+
magic-string@0.30.10:
resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==}
@@ -1089,13 +1106,17 @@ packages:
minimatch@3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
- minimatch@5.1.6:
- resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==}
- engines: {node: '>=10'}
+ minimatch@9.0.5:
+ resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
+ engines: {node: '>=16 || 14 >=14.17'}
minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
+ minipass@7.1.2:
+ resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
+ engines: {node: '>=16 || 14 >=14.17'}
+
ms@2.0.0:
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
@@ -1154,6 +1175,9 @@ packages:
resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
engines: {node: '>=10'}
+ package-json-from-dist@1.0.0:
+ resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==}
+
parent-module@1.0.1:
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'}
@@ -1176,6 +1200,10 @@ packages:
path-parse@1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
+ path-scurry@1.11.1:
+ resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
+ engines: {node: '>=16 || 14 >=14.18'}
+
path-to-regexp@2.2.1:
resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==}
@@ -1338,6 +1366,10 @@ packages:
signal-exit@3.0.7:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
+ signal-exit@4.1.0:
+ resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
+ engines: {node: '>=14'}
+
spawn-command@0.0.2:
resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==}
@@ -1530,9 +1562,18 @@ snapshots:
'@humanwhocodes/object-schema@2.0.3': {}
+ '@isaacs/cliui@8.0.2':
+ dependencies:
+ string-width: 5.1.2
+ string-width-cjs: string-width@4.2.3
+ strip-ansi: 7.1.0
+ strip-ansi-cjs: strip-ansi@6.0.1
+ wrap-ansi: 8.1.0
+ wrap-ansi-cjs: wrap-ansi@7.0.0
+
'@jridgewell/sourcemap-codec@1.4.15': {}
- '@mapbox-controls/helpers@2.0.0(mapbox-gl@3.4.0)':
+ '@mapbox-controls/helpers@2.1.0(mapbox-gl@3.4.0)':
dependencies:
mapbox-gl: 3.4.0
@@ -1564,12 +1605,15 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.17.1
- '@rollup/plugin-commonjs@25.0.8(rollup@4.18.0)':
+ '@pkgjs/parseargs@0.11.0':
+ optional: true
+
+ '@rollup/plugin-commonjs@26.0.1(rollup@4.18.0)':
dependencies:
'@rollup/pluginutils': 5.1.0(rollup@4.18.0)
commondir: 1.0.1
estree-walker: 2.0.2
- glob: 8.1.0
+ glob: 10.4.2
is-reference: 1.2.1
magic-string: 0.30.10
optionalDependencies:
@@ -1650,108 +1694,104 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.18.0':
optional: true
- '@turf/bbox@7.0.0-alpha.116':
+ '@turf/bbox@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.116
- '@turf/meta': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
+ '@turf/meta': 7.0.0
tslib: 2.6.2
- '@turf/bearing@7.0.0-alpha.2':
+ '@turf/bearing@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.2
- '@turf/invariant': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
+ '@turf/invariant': 7.0.0
tslib: 2.6.2
- '@turf/center@7.0.0-alpha.116':
+ '@turf/center@7.0.0':
dependencies:
- '@turf/bbox': 7.0.0-alpha.116
- '@turf/helpers': 7.0.0-alpha.116
+ '@turf/bbox': 7.0.0
+ '@turf/helpers': 7.0.0
tslib: 2.6.2
- '@turf/centroid@7.0.0-alpha.2':
+ '@turf/centroid@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.2
- '@turf/meta': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
+ '@turf/meta': 7.0.0
tslib: 2.6.2
- '@turf/clone@7.0.0-alpha.116':
+ '@turf/clone@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
tslib: 2.6.2
- '@turf/distance@7.0.0-alpha.2':
+ '@turf/distance@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.2
- '@turf/invariant': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
+ '@turf/invariant': 7.0.0
tslib: 2.6.2
- '@turf/helpers@7.0.0-alpha.116':
+ '@turf/helpers@7.0.0':
dependencies:
deep-equal: 2.2.3
tslib: 2.6.2
- '@turf/helpers@7.0.0-alpha.2':
- dependencies:
- tslib: 2.6.2
-
- '@turf/invariant@7.0.0-alpha.116':
+ '@turf/invariant@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
tslib: 2.6.2
- '@turf/meta@7.0.0-alpha.116':
+ '@turf/meta@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
- '@turf/rhumb-bearing@7.0.0-alpha.2':
+ '@turf/rhumb-bearing@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.2
- '@turf/invariant': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
+ '@turf/invariant': 7.0.0
tslib: 2.6.2
- '@turf/rhumb-destination@7.0.0-alpha.116':
+ '@turf/rhumb-destination@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.116
- '@turf/invariant': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
+ '@turf/invariant': 7.0.0
tslib: 2.6.2
- '@turf/rhumb-distance@7.0.0-alpha.2':
+ '@turf/rhumb-distance@7.0.0':
dependencies:
- '@turf/helpers': 7.0.0-alpha.2
- '@turf/invariant': 7.0.0-alpha.116
+ '@turf/helpers': 7.0.0
+ '@turf/invariant': 7.0.0
tslib: 2.6.2
- '@turf/transform-rotate@7.0.0-alpha.2':
- dependencies:
- '@turf/centroid': 7.0.0-alpha.2
- '@turf/clone': 7.0.0-alpha.116
- '@turf/helpers': 7.0.0-alpha.2
- '@turf/invariant': 7.0.0-alpha.116
- '@turf/meta': 7.0.0-alpha.116
- '@turf/rhumb-bearing': 7.0.0-alpha.2
- '@turf/rhumb-destination': 7.0.0-alpha.116
- '@turf/rhumb-distance': 7.0.0-alpha.2
-
- '@turf/transform-scale@7.0.0-alpha.2':
- dependencies:
- '@turf/bbox': 7.0.0-alpha.116
- '@turf/center': 7.0.0-alpha.116
- '@turf/centroid': 7.0.0-alpha.2
- '@turf/clone': 7.0.0-alpha.116
- '@turf/helpers': 7.0.0-alpha.2
- '@turf/invariant': 7.0.0-alpha.116
- '@turf/meta': 7.0.0-alpha.116
- '@turf/rhumb-bearing': 7.0.0-alpha.2
- '@turf/rhumb-destination': 7.0.0-alpha.116
- '@turf/rhumb-distance': 7.0.0-alpha.2
-
- '@turf/transform-translate@7.0.0-alpha.2':
- dependencies:
- '@turf/clone': 7.0.0-alpha.116
- '@turf/helpers': 7.0.0-alpha.2
- '@turf/invariant': 7.0.0-alpha.116
- '@turf/meta': 7.0.0-alpha.116
- '@turf/rhumb-destination': 7.0.0-alpha.116
+ '@turf/transform-rotate@7.0.0':
+ dependencies:
+ '@turf/centroid': 7.0.0
+ '@turf/clone': 7.0.0
+ '@turf/helpers': 7.0.0
+ '@turf/invariant': 7.0.0
+ '@turf/meta': 7.0.0
+ '@turf/rhumb-bearing': 7.0.0
+ '@turf/rhumb-destination': 7.0.0
+ '@turf/rhumb-distance': 7.0.0
+
+ '@turf/transform-scale@7.0.0':
+ dependencies:
+ '@turf/bbox': 7.0.0
+ '@turf/center': 7.0.0
+ '@turf/centroid': 7.0.0
+ '@turf/clone': 7.0.0
+ '@turf/helpers': 7.0.0
+ '@turf/invariant': 7.0.0
+ '@turf/meta': 7.0.0
+ '@turf/rhumb-bearing': 7.0.0
+ '@turf/rhumb-destination': 7.0.0
+ '@turf/rhumb-distance': 7.0.0
+
+ '@turf/transform-translate@7.0.0':
+ dependencies:
+ '@turf/clone': 7.0.0
+ '@turf/helpers': 7.0.0
+ '@turf/invariant': 7.0.0
+ '@turf/meta': 7.0.0
+ '@turf/rhumb-destination': 7.0.0
'@types/estree@1.0.5': {}
@@ -2142,6 +2182,11 @@ snapshots:
dependencies:
is-callable: 1.2.7
+ foreground-child@3.2.1:
+ dependencies:
+ cross-spawn: 7.0.3
+ signal-exit: 4.1.0
+
fs.realpath@1.0.0: {}
fsevents@2.3.3:
@@ -2171,6 +2216,15 @@ snapshots:
dependencies:
is-glob: 4.0.3
+ glob@10.4.2:
+ dependencies:
+ foreground-child: 3.2.1
+ jackspeak: 3.4.0
+ minimatch: 9.0.5
+ minipass: 7.1.2
+ package-json-from-dist: 1.0.0
+ path-scurry: 1.11.1
+
glob@7.2.3:
dependencies:
fs.realpath: 1.0.0
@@ -2180,14 +2234,6 @@ snapshots:
once: 1.4.0
path-is-absolute: 1.0.1
- glob@8.1.0:
- dependencies:
- fs.realpath: 1.0.0
- inflight: 1.0.6
- inherits: 2.0.4
- minimatch: 5.1.6
- once: 1.4.0
-
globals@13.24.0:
dependencies:
type-fest: 0.20.2
@@ -2343,6 +2389,12 @@ snapshots:
isexe@2.0.0: {}
+ jackspeak@3.4.0:
+ dependencies:
+ '@isaacs/cliui': 8.0.2
+ optionalDependencies:
+ '@pkgjs/parseargs': 0.11.0
+
js-yaml@4.1.0:
dependencies:
argparse: 2.0.1
@@ -2376,6 +2428,8 @@ snapshots:
lodash@4.17.21: {}
+ lru-cache@10.2.2: {}
+
magic-string@0.30.10:
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
@@ -2430,12 +2484,14 @@ snapshots:
dependencies:
brace-expansion: 1.1.11
- minimatch@5.1.6:
+ minimatch@9.0.5:
dependencies:
brace-expansion: 2.0.1
minimist@1.2.8: {}
+ minipass@7.1.2: {}
+
ms@2.0.0: {}
ms@2.1.2: {}
@@ -2493,6 +2549,8 @@ snapshots:
dependencies:
p-limit: 3.1.0
+ package-json-from-dist@1.0.0: {}
+
parent-module@1.0.1:
dependencies:
callsites: 3.1.0
@@ -2507,6 +2565,11 @@ snapshots:
path-parse@1.0.7: {}
+ path-scurry@1.11.1:
+ dependencies:
+ lru-cache: 10.2.2
+ minipass: 7.1.2
+
path-to-regexp@2.2.1: {}
pbf@3.2.1:
@@ -2691,6 +2754,8 @@ snapshots:
signal-exit@3.0.7: {}
+ signal-exit@4.1.0: {}
+
spawn-command@0.0.2: {}
stop-iteration-iterator@1.0.0:
diff --git a/preview/package.json b/preview/package.json
index 5e2d3a5..8cf2f42 100644
--- a/preview/package.json
+++ b/preview/package.json
@@ -20,7 +20,7 @@
"mapbox-gl": "3.4.0"
},
"devDependencies": {
- "@rollup/plugin-commonjs": "25.0.8",
+ "@rollup/plugin-commonjs": "26.0.1",
"@rollup/plugin-node-resolve": "15.2.3",
"concurrently": "8.2.2",
"rollup": "4.18.0",
@@ -28,4 +28,4 @@
"rollup-plugin-polyfill-node": "0.13.0",
"serve": "14.2.3"
}
-}
+}
\ No newline at end of file
diff --git a/preview/preview.bundle.js b/preview/preview.bundle.js
index eaea737..9fb67b9 100644
--- a/preview/preview.bundle.js
+++ b/preview/preview.bundle.js
@@ -155,15 +155,17 @@
return /** @type SVGElement */ ((new DOMParser().parseFromString(string, 'image/svg+xml')).firstChild);
}
- const compass = parseSVG(`
-
-`);
+ function compass() {
+ return parseSVG(`
+
+ `);
+ }
const icons$5 = {
compass,
@@ -182,10 +184,10 @@
constructor(options = {}) {
this.options = { ...options };
this.container = controlContainer('mapbox-ctrl-compass');
- this.icon = icons$5.compass;
+ this.icon = icons$5.compass();
this.button = controlButton({
title: 'Compass',
- icon: icons$5.compass,
+ icon: this.icon,
onClick: () => this.onControlButtonClick(),
});
}
@@ -298,291 +300,6 @@
]);
}
- /**
- * @module helpers
- */
- /**
- * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
- *
- * @memberof helpers
- * @type {number}
- */
- const earthRadius$1 = 6371008.8;
- /**
- * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
- *
- * Keys are the name of the unit, values are the number of that unit in a single radian
- *
- * @memberof helpers
- * @type {Object}
- */
- const factors$1 = {
- centimeters: earthRadius$1 * 100,
- centimetres: earthRadius$1 * 100,
- degrees: 360 / (2 * Math.PI),
- feet: earthRadius$1 * 3.28084,
- inches: earthRadius$1 * 39.37,
- kilometers: earthRadius$1 / 1000,
- kilometres: earthRadius$1 / 1000,
- meters: earthRadius$1,
- metres: earthRadius$1,
- miles: earthRadius$1 / 1609.344,
- millimeters: earthRadius$1 * 1000,
- millimetres: earthRadius$1 * 1000,
- nauticalmiles: earthRadius$1 / 1852,
- radians: 1,
- yards: earthRadius$1 * 1.0936,
- };
- /**
- * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.
- *
- * @name feature
- * @param {Geometry} geometry input geometry
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature} a GeoJSON Feature
- * @example
- * var geometry = {
- * "type": "Point",
- * "coordinates": [110, 50]
- * };
- *
- * var feature = turf.feature(geometry);
- *
- * //=feature
- */
- function feature$1(geom, properties, options = {}) {
- const feat = { type: "Feature" };
- if (options.id === 0 || options.id) {
- feat.id = options.id;
- }
- if (options.bbox) {
- feat.bbox = options.bbox;
- }
- feat.properties = properties || {};
- feat.geometry = geom;
- return feat;
- }
- /**
- * Creates a {@link Point} {@link Feature} from a Position.
- *
- * @name point
- * @param {Array} coordinates longitude, latitude position (each in decimal degrees)
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature} a Point feature
- * @example
- * var point = turf.point([-75.343, 39.984]);
- *
- * //=point
- */
- function point$1(coordinates, properties, options = {}) {
- if (!coordinates) {
- throw new Error("coordinates is required");
- }
- if (!Array.isArray(coordinates)) {
- throw new Error("coordinates must be an Array");
- }
- if (coordinates.length < 2) {
- throw new Error("coordinates must be at least 2 numbers long");
- }
- if (!isNumber$4(coordinates[0]) || !isNumber$4(coordinates[1])) {
- throw new Error("coordinates must contain numbers");
- }
- const geom = {
- type: "Point",
- coordinates,
- };
- return feature$1(geom, properties, options);
- }
- /**
- * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.
- *
- * @name polygon
- * @param {Array>>} coordinates an array of LinearRings
- * @param {Object} [properties={}] an Object of key-value pairs to add as properties
- * @param {Object} [options={}] Optional Parameters
- * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {Feature} Polygon Feature
- * @example
- * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });
- *
- * //=polygon
- */
- function polygon$2(coordinates, properties, options = {}) {
- for (const ring of coordinates) {
- if (ring.length < 4) {
- throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
- }
- if (ring[ring.length - 1].length !== ring[0].length) {
- throw new Error("First and last Position are not equivalent.");
- }
- for (let j = 0; j < ring[ring.length - 1].length; j++) {
- // Check if first point of Polygon contains two numbers
- if (ring[ring.length - 1][j] !== ring[0][j]) {
- throw new Error("First and last Position are not equivalent.");
- }
- }
- }
- const geom = {
- type: "Polygon",
- coordinates,
- };
- return feature$1(geom, properties, options);
- }
- /**
- * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.
- *
- * @name featureCollection
- * @param {Feature[]} features input features
- * @param {Object} [options={}] Optional Parameters
- * @param {Array} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature
- * @param {string|number} [options.id] Identifier associated with the Feature
- * @returns {FeatureCollection} FeatureCollection of Features
- * @example
- * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});
- * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});
- * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});
- *
- * var collection = turf.featureCollection([
- * locationA,
- * locationB,
- * locationC
- * ]);
- *
- * //=collection
- */
- function featureCollection$1(features, options = {}) {
- const fc = { type: "FeatureCollection" };
- if (options.id) {
- fc.id = options.id;
- }
- if (options.bbox) {
- fc.bbox = options.bbox;
- }
- fc.features = features;
- return fc;
- }
- /**
- * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.
- * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
- *
- * @name radiansToLength
- * @param {number} radians in radians across the sphere
- * @param {string} [units="kilometers"] can be degrees, radians, miles, inches, yards, metres,
- * meters, kilometres, kilometers.
- * @returns {number} distance
- */
- function radiansToLength$1(radians, units = "kilometers") {
- const factor = factors$1[units];
- if (!factor) {
- throw new Error(units + " units is invalid");
- }
- return radians * factor;
- }
- /**
- * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians
- * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
- *
- * @name lengthToRadians
- * @param {number} distance in real units
- * @param {string} [units="kilometers"] can be degrees, radians, miles, inches, yards, metres,
- * meters, kilometres, kilometers.
- * @returns {number} radians
- */
- function lengthToRadians$1(distance, units = "kilometers") {
- const factor = factors$1[units];
- if (!factor) {
- throw new Error(units + " units is invalid");
- }
- return distance / factor;
- }
- /**
- * Converts any bearing angle from the north line direction (positive clockwise)
- * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line
- *
- * @name bearingToAzimuth
- * @param {number} bearing angle, between -180 and +180 degrees
- * @returns {number} angle between 0 and 360 degrees
- */
- function bearingToAzimuth$1(bearing) {
- let angle = bearing % 360;
- if (angle < 0) {
- angle += 360;
- }
- return angle;
- }
- /**
- * Converts an angle in radians to degrees
- *
- * @name radiansToDegrees
- * @param {number} radians angle in radians
- * @returns {number} degrees between 0 and 360 degrees
- */
- function radiansToDegrees$1(radians) {
- const degrees = radians % (2 * Math.PI);
- return (degrees * 180) / Math.PI;
- }
- /**
- * Converts an angle in degrees to radians
- *
- * @name degreesToRadians
- * @param {number} degrees angle between 0 and 360 degrees
- * @returns {number} angle in radians
- */
- function degreesToRadians$1(degrees) {
- const radians = degrees % 360;
- return (radians * Math.PI) / 180;
- }
- /**
- * Converts a length to the requested unit.
- * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet
- *
- * @param {number} length to be converted
- * @param {Units} [originalUnit="kilometers"] of the length
- * @param {Units} [finalUnit="kilometers"] returned unit
- * @returns {number} the converted length
- */
- function convertLength$1(length, originalUnit = "kilometers", finalUnit = "kilometers") {
- if (!(length >= 0)) {
- throw new Error("length must be a positive number");
- }
- return radiansToLength$1(lengthToRadians$1(length, originalUnit), finalUnit);
- }
- /**
- * isNumber
- *
- * @param {*} num Number to validate
- * @returns {boolean} true/false
- * @example
- * turf.isNumber(123)
- * //=true
- * turf.isNumber('foo')
- * //=false
- */
- function isNumber$4(num) {
- return !isNaN(num) && num !== null && !Array.isArray(num);
- }
- /**
- * isObject
- *
- * @param {*} input variable to validate
- * @returns {boolean} true/false, including false for Arrays and Functions
- * @example
- * turf.isObject({elevation: 10})
- * //=true
- * turf.isObject('foo')
- * //=false
- */
- function isObject$2(input) {
- return input !== null && typeof input === "object" && !Array.isArray(input);
- }
-
var toStr$9 = Object.prototype.toString;
var isArguments$2 = function isArguments(value) {
@@ -6794,8 +6511,8 @@
var equal = /*@__PURE__*/getDefaultExportFromCjs(deepEqual);
- var __defProp$6 = Object.defineProperty;
- var __name$6 = (target, value) => __defProp$6(target, "name", { value, configurable: true });
+ var __defProp$e = Object.defineProperty;
+ var __name$e = (target, value) => __defProp$e(target, "name", { value, configurable: true });
var _GeojsonEquality = class _GeojsonEquality {
constructor(opts) {
this.direction = false;
@@ -6907,18 +6624,18 @@
return Boolean(!g1.bbox && !g2.bbox) || (g1.bbox && g2.bbox ? this.compareCoord(g1.bbox, g2.bbox) : false);
}
};
- __name$6(_GeojsonEquality, "GeojsonEquality");
+ __name$e(_GeojsonEquality, "GeojsonEquality");
function sameLength(g1, g2) {
return g1.coordinates ? g1.coordinates.length === g2.coordinates.length : g1.length === g2.length;
}
- __name$6(sameLength, "sameLength");
+ __name$e(sameLength, "sameLength");
function explode(g) {
return g.coordinates.map((part) => ({
type: g.type.replace("Multi", ""),
coordinates: part
}));
}
- __name$6(explode, "explode");
+ __name$e(explode, "explode");
// index.ts
var earthRadius = 63710088e-1;
@@ -6968,7 +6685,7 @@
feat.geometry = geom;
return feat;
}
- __name$6(feature, "feature");
+ __name$e(feature, "feature");
function geometry(type, coordinates, _options = {}) {
switch (type) {
case "Point":
@@ -6987,7 +6704,7 @@
throw new Error(type + " is invalid");
}
}
- __name$6(geometry, "geometry");
+ __name$e(geometry, "geometry");
function point(coordinates, properties, options = {}) {
if (!coordinates) {
throw new Error("coordinates is required");
@@ -7007,7 +6724,7 @@
};
return feature(geom, properties, options);
}
- __name$6(point, "point");
+ __name$e(point, "point");
function points(coordinates, properties, options = {}) {
return featureCollection(
coordinates.map((coords) => {
@@ -7016,7 +6733,7 @@
options
);
}
- __name$6(points, "points");
+ __name$e(points, "points");
function polygon$1(coordinates, properties, options = {}) {
for (const ring of coordinates) {
if (ring.length < 4) {
@@ -7039,7 +6756,7 @@
};
return feature(geom, properties, options);
}
- __name$6(polygon$1, "polygon");
+ __name$e(polygon$1, "polygon");
function polygons(coordinates, properties, options = {}) {
return featureCollection(
coordinates.map((coords) => {
@@ -7048,7 +6765,7 @@
options
);
}
- __name$6(polygons, "polygons");
+ __name$e(polygons, "polygons");
function lineString(coordinates, properties, options = {}) {
if (coordinates.length < 2) {
throw new Error("coordinates must be an array of two or more positions");
@@ -7059,7 +6776,7 @@
};
return feature(geom, properties, options);
}
- __name$6(lineString, "lineString");
+ __name$e(lineString, "lineString");
function lineStrings(coordinates, properties, options = {}) {
return featureCollection(
coordinates.map((coords) => {
@@ -7068,7 +6785,7 @@
options
);
}
- __name$6(lineStrings, "lineStrings");
+ __name$e(lineStrings, "lineStrings");
function featureCollection(features, options = {}) {
const fc = { type: "FeatureCollection" };
if (options.id) {
@@ -7080,7 +6797,7 @@
fc.features = features;
return fc;
}
- __name$6(featureCollection, "featureCollection");
+ __name$e(featureCollection, "featureCollection");
function multiLineString(coordinates, properties, options = {}) {
const geom = {
type: "MultiLineString",
@@ -7088,7 +6805,7 @@
};
return feature(geom, properties, options);
}
- __name$6(multiLineString, "multiLineString");
+ __name$e(multiLineString, "multiLineString");
function multiPoint(coordinates, properties, options = {}) {
const geom = {
type: "MultiPoint",
@@ -7096,7 +6813,7 @@
};
return feature(geom, properties, options);
}
- __name$6(multiPoint, "multiPoint");
+ __name$e(multiPoint, "multiPoint");
function multiPolygon(coordinates, properties, options = {}) {
const geom = {
type: "MultiPolygon",
@@ -7104,7 +6821,7 @@
};
return feature(geom, properties, options);
}
- __name$6(multiPolygon, "multiPolygon");
+ __name$e(multiPolygon, "multiPolygon");
function geometryCollection(geometries, properties, options = {}) {
const geom = {
type: "GeometryCollection",
@@ -7112,7 +6829,7 @@
};
return feature(geom, properties, options);
}
- __name$6(geometryCollection, "geometryCollection");
+ __name$e(geometryCollection, "geometryCollection");
function round(num, precision = 0) {
if (precision && !(precision >= 0)) {
throw new Error("precision must be a positive number");
@@ -7120,7 +6837,7 @@
const multiplier = Math.pow(10, precision || 0);
return Math.round(num * multiplier) / multiplier;
}
- __name$6(round, "round");
+ __name$e(round, "round");
function radiansToLength(radians, units = "kilometers") {
const factor = factors[units];
if (!factor) {
@@ -7128,7 +6845,7 @@
}
return radians * factor;
}
- __name$6(radiansToLength, "radiansToLength");
+ __name$e(radiansToLength, "radiansToLength");
function lengthToRadians(distance, units = "kilometers") {
const factor = factors[units];
if (!factor) {
@@ -7136,11 +6853,11 @@
}
return distance / factor;
}
- __name$6(lengthToRadians, "lengthToRadians");
+ __name$e(lengthToRadians, "lengthToRadians");
function lengthToDegrees(distance, units) {
return radiansToDegrees(lengthToRadians(distance, units));
}
- __name$6(lengthToDegrees, "lengthToDegrees");
+ __name$e(lengthToDegrees, "lengthToDegrees");
function bearingToAzimuth(bearing) {
let angle = bearing % 360;
if (angle < 0) {
@@ -7148,24 +6865,24 @@
}
return angle;
}
- __name$6(bearingToAzimuth, "bearingToAzimuth");
+ __name$e(bearingToAzimuth, "bearingToAzimuth");
function radiansToDegrees(radians) {
const degrees = radians % (2 * Math.PI);
return degrees * 180 / Math.PI;
}
- __name$6(radiansToDegrees, "radiansToDegrees");
+ __name$e(radiansToDegrees, "radiansToDegrees");
function degreesToRadians(degrees) {
const radians = degrees % 360;
return radians * Math.PI / 180;
}
- __name$6(degreesToRadians, "degreesToRadians");
+ __name$e(degreesToRadians, "degreesToRadians");
function convertLength(length, originalUnit = "kilometers", finalUnit = "kilometers") {
if (!(length >= 0)) {
throw new Error("length must be a positive number");
}
return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);
}
- __name$6(convertLength, "convertLength");
+ __name$e(convertLength, "convertLength");
function convertArea(area, originalUnit = "meters", finalUnit = "kilometers") {
if (!(area >= 0)) {
throw new Error("area must be a positive number");
@@ -7180,15 +6897,15 @@
}
return area / startFactor * finalFactor;
}
- __name$6(convertArea, "convertArea");
+ __name$e(convertArea, "convertArea");
function isNumber(num) {
return !isNaN(num) && num !== null && !Array.isArray(num);
}
- __name$6(isNumber, "isNumber");
+ __name$e(isNumber, "isNumber");
function isObject(input) {
return input !== null && typeof input === "object" && !Array.isArray(input);
}
- __name$6(isObject, "isObject");
+ __name$e(isObject, "isObject");
function validateBBox(bbox) {
if (!bbox) {
throw new Error("bbox is required");
@@ -7205,7 +6922,7 @@
}
});
}
- __name$6(validateBBox, "validateBBox");
+ __name$e(validateBBox, "validateBBox");
function validateId(id) {
if (!id) {
throw new Error("id is required");
@@ -7214,10 +6931,10 @@
throw new Error("id must be a number or a string");
}
}
- __name$6(validateId, "validateId");
+ __name$e(validateId, "validateId");
- var __defProp$5 = Object.defineProperty;
- var __name$5 = (target, value) => __defProp$5(target, "name", { value, configurable: true });
+ var __defProp$d = Object.defineProperty;
+ var __name$d = (target, value) => __defProp$d(target, "name", { value, configurable: true });
function coordEach(geojson, callback, excludeWrapCoord) {
if (geojson === null)
return;
@@ -7321,7 +7038,7 @@
}
}
}
- __name$5(coordEach, "coordEach");
+ __name$d(coordEach, "coordEach");
function coordReduce(geojson, callback, initialValue, excludeWrapCoord) {
var previousValue = initialValue;
coordEach(
@@ -7343,7 +7060,7 @@
);
return previousValue;
}
- __name$5(coordReduce, "coordReduce");
+ __name$d(coordReduce, "coordReduce");
function propEach(geojson, callback) {
var i;
switch (geojson.type) {
@@ -7358,7 +7075,7 @@
break;
}
}
- __name$5(propEach, "propEach");
+ __name$d(propEach, "propEach");
function propReduce(geojson, callback, initialValue) {
var previousValue = initialValue;
propEach(geojson, function(currentProperties, featureIndex) {
@@ -7369,7 +7086,7 @@
});
return previousValue;
}
- __name$5(propReduce, "propReduce");
+ __name$d(propReduce, "propReduce");
function featureEach(geojson, callback) {
if (geojson.type === "Feature") {
callback(geojson, 0);
@@ -7380,7 +7097,7 @@
}
}
}
- __name$5(featureEach, "featureEach");
+ __name$d(featureEach, "featureEach");
function featureReduce(geojson, callback, initialValue) {
var previousValue = initialValue;
featureEach(geojson, function(currentFeature, featureIndex) {
@@ -7391,7 +7108,7 @@
});
return previousValue;
}
- __name$5(featureReduce, "featureReduce");
+ __name$d(featureReduce, "featureReduce");
function coordAll(geojson) {
var coords = [];
coordEach(geojson, function(coord) {
@@ -7399,7 +7116,7 @@
});
return coords;
}
- __name$5(coordAll, "coordAll");
+ __name$d(coordAll, "coordAll");
function geomEach(geojson, callback) {
var i, j, g, geometry, stopG, geometryMaybeCollection, isGeometryCollection, featureProperties, featureBBox, featureId, featureIndex = 0, isFeatureCollection = geojson.type === "FeatureCollection", isFeature = geojson.type === "Feature", stop = isFeatureCollection ? geojson.features.length : 1;
for (i = 0; i < stop; i++) {
@@ -7459,7 +7176,7 @@
featureIndex++;
}
}
- __name$5(geomEach, "geomEach");
+ __name$d(geomEach, "geomEach");
function geomReduce(geojson, callback, initialValue) {
var previousValue = initialValue;
geomEach(
@@ -7480,7 +7197,7 @@
);
return previousValue;
}
- __name$5(geomReduce, "geomReduce");
+ __name$d(geomReduce, "geomReduce");
function flattenEach(geojson, callback) {
geomEach(geojson, function(geometry, featureIndex, properties, bbox, id) {
var type = geometry === null ? null : geometry.type;
@@ -7520,7 +7237,7 @@
}
});
}
- __name$5(flattenEach, "flattenEach");
+ __name$d(flattenEach, "flattenEach");
function flattenReduce(geojson, callback, initialValue) {
var previousValue = initialValue;
flattenEach(
@@ -7539,7 +7256,7 @@
);
return previousValue;
}
- __name$5(flattenReduce, "flattenReduce");
+ __name$d(flattenReduce, "flattenReduce");
function segmentEach(geojson, callback) {
flattenEach(geojson, function(feature2, featureIndex, multiFeatureIndex) {
var segmentIndex = 0;
@@ -7582,7 +7299,7 @@
return false;
});
}
- __name$5(segmentEach, "segmentEach");
+ __name$d(segmentEach, "segmentEach");
function segmentReduce(geojson, callback, initialValue) {
var previousValue = initialValue;
var started = false;
@@ -7605,7 +7322,7 @@
);
return previousValue;
}
- __name$5(segmentReduce, "segmentReduce");
+ __name$d(segmentReduce, "segmentReduce");
function lineEach(geojson, callback) {
if (!geojson)
throw new Error("geojson is required");
@@ -7633,7 +7350,7 @@
}
});
}
- __name$5(lineEach, "lineEach");
+ __name$d(lineEach, "lineEach");
function lineReduce(geojson, callback, initialValue) {
var previousValue = initialValue;
lineEach(
@@ -7653,7 +7370,7 @@
);
return previousValue;
}
- __name$5(lineReduce, "lineReduce");
+ __name$d(lineReduce, "lineReduce");
function findSegment(geojson, options) {
options = options || {};
if (!isObject(options))
@@ -7746,7 +7463,7 @@
}
throw new Error("geojson is invalid");
}
- __name$5(findSegment, "findSegment");
+ __name$d(findSegment, "findSegment");
function findPoint(geojson, options) {
options = options || {};
if (!isObject(options))
@@ -7821,38 +7538,30 @@
}
throw new Error("geojson is invalid");
}
- __name$5(findPoint, "findPoint");
+ __name$d(findPoint, "findPoint");
- /**
- * Computes the centroid as the mean of all vertices within the object.
- *
- * @name centroid
- * @param {GeoJSON} geojson GeoJSON to be centered
- * @param {Object} [options={}] Optional Parameters
- * @param {Object} [options.properties={}] an Object that is used as the {@link Feature}'s properties
- * @returns {Feature} the centroid of the input object
- * @example
- * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);
- *
- * var centroid = turf.centroid(polygon);
- *
- * //addToMap
- * var addToMap = [polygon, centroid]
- */
+ var __defProp$c = Object.defineProperty;
+ var __name$c = (target, value) => __defProp$c(target, "name", { value, configurable: true });
function centroid(geojson, options = {}) {
- let xSum = 0;
- let ySum = 0;
- let len = 0;
- coordEach(geojson, function (coord) {
- xSum += coord[0];
- ySum += coord[1];
- len++;
- }, true);
- return point$1([xSum / len, ySum / len], options.properties);
+ let xSum = 0;
+ let ySum = 0;
+ let len = 0;
+ coordEach(
+ geojson,
+ function(coord) {
+ xSum += coord[0];
+ ySum += coord[1];
+ len++;
+ },
+ true
+ );
+ return point([xSum / len, ySum / len], options.properties);
}
+ __name$c(centroid, "centroid");
+ var turf_centroid_default = centroid;
- var __defProp$4 = Object.defineProperty;
- var __name$4 = (target, value) => __defProp$4(target, "name", { value, configurable: true });
+ var __defProp$b = Object.defineProperty;
+ var __name$b = (target, value) => __defProp$b(target, "name", { value, configurable: true });
function getCoord(coord) {
if (!coord) {
throw new Error("coord is required");
@@ -7870,7 +7579,7 @@
}
throw new Error("coord must be GeoJSON Point or an Array of numbers");
}
- __name$4(getCoord, "getCoord");
+ __name$b(getCoord, "getCoord");
function getCoords(coords) {
if (Array.isArray(coords)) {
return coords;
@@ -7888,7 +7597,7 @@
"coords must be GeoJSON Feature, Geometry Object or an Array"
);
}
- __name$4(getCoords, "getCoords");
+ __name$b(getCoords, "getCoords");
function containsNumber(coordinates) {
if (coordinates.length > 1 && isNumber(coordinates[0]) && isNumber(coordinates[1])) {
return true;
@@ -7898,7 +7607,7 @@
}
throw new Error("coordinates must only contain numbers");
}
- __name$4(containsNumber, "containsNumber");
+ __name$b(containsNumber, "containsNumber");
function geojsonType(value, type, name) {
if (!type || !name) {
throw new Error("type and name required");
@@ -7909,7 +7618,7 @@
);
}
}
- __name$4(geojsonType, "geojsonType");
+ __name$b(geojsonType, "geojsonType");
function featureOf(feature, type, name) {
if (!feature) {
throw new Error("No feature passed");
@@ -7928,7 +7637,7 @@
);
}
}
- __name$4(featureOf, "featureOf");
+ __name$b(featureOf, "featureOf");
function collectionOf(featureCollection, type, name) {
if (!featureCollection) {
throw new Error("No featureCollection passed");
@@ -7954,14 +7663,14 @@
}
}
}
- __name$4(collectionOf, "collectionOf");
+ __name$b(collectionOf, "collectionOf");
function getGeom(geojson) {
if (geojson.type === "Feature") {
return geojson.geometry;
}
return geojson;
}
- __name$4(getGeom, "getGeom");
+ __name$b(getGeom, "getGeom");
function getType(geojson, _name) {
if (geojson.type === "FeatureCollection") {
return "FeatureCollection";
@@ -7974,157 +7683,76 @@
}
return geojson.type;
}
- __name$4(getType, "getType");
+ __name$b(getType, "getType");
- // https://en.wikipedia.org/wiki/Rhumb_line
- /**
- * Takes two {@link Point|points} and finds the bearing angle between them along a Rhumb line
- * i.e. the angle measured in degrees start the north line (0 degrees)
- *
- * @name rhumbBearing
- * @param {Coord} start starting Point
- * @param {Coord} end ending Point
- * @param {Object} [options] Optional parameters
- * @param {boolean} [options.final=false] calculates the final bearing if true
- * @returns {number} bearing from north in decimal degrees, between -180 and 180 degrees (positive clockwise)
- * @example
- * var point1 = turf.point([-75.343, 39.984], {"marker-color": "#F00"});
- * var point2 = turf.point([-75.534, 39.123], {"marker-color": "#00F"});
- *
- * var bearing = turf.rhumbBearing(point1, point2);
- *
- * //addToMap
- * var addToMap = [point1, point2];
- * point1.properties.bearing = bearing;
- * point2.properties.bearing = bearing;
- */
+ var __defProp$a = Object.defineProperty;
+ var __name$a = (target, value) => __defProp$a(target, "name", { value, configurable: true });
function rhumbBearing(start, end, options = {}) {
- let bear360;
- if (options.final) {
- bear360 = calculateRhumbBearing(getCoord(end), getCoord(start));
- }
- else {
- bear360 = calculateRhumbBearing(getCoord(start), getCoord(end));
- }
- const bear180 = bear360 > 180 ? -(360 - bear360) : bear360;
- return bear180;
+ let bear360;
+ if (options.final) {
+ bear360 = calculateRhumbBearing(getCoord(end), getCoord(start));
+ } else {
+ bear360 = calculateRhumbBearing(getCoord(start), getCoord(end));
+ }
+ const bear180 = bear360 > 180 ? -(360 - bear360) : bear360;
+ return bear180;
}
- /**
- * Returns the bearing from ‘this’ point to destination point along a rhumb line.
- * Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
- *
- * @private
- * @param {Array} from - origin point.
- * @param {Array} to - destination point.
- * @returns {number} Bearing in degrees from north.
- * @example
- * var p1 = new LatLon(51.127, 1.338);
- * var p2 = new LatLon(50.964, 1.853);
- * var d = p1.rhumbBearingTo(p2); // 116.7 m
- */
+ __name$a(rhumbBearing, "rhumbBearing");
function calculateRhumbBearing(from, to) {
- // φ => phi
- // Δλ => deltaLambda
- // Δψ => deltaPsi
- // θ => theta
- const phi1 = degreesToRadians$1(from[1]);
- const phi2 = degreesToRadians$1(to[1]);
- let deltaLambda = degreesToRadians$1(to[0] - from[0]);
- // if deltaLambdaon over 180° take shorter rhumb line across the anti-meridian:
- if (deltaLambda > Math.PI) {
- deltaLambda -= 2 * Math.PI;
- }
- if (deltaLambda < -Math.PI) {
- deltaLambda += 2 * Math.PI;
- }
- const deltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
- const theta = Math.atan2(deltaLambda, deltaPsi);
- return (radiansToDegrees$1(theta) + 360) % 360;
- }
-
- // https://en.wikipedia.org/wiki/Rhumb_line
- /**
- * Calculates the distance along a rhumb line between two {@link Point|points} in degrees, radians,
- * miles, or kilometers.
- *
- * @name rhumbDistance
- * @param {Coord} from origin point
- * @param {Coord} to destination point
- * @param {Object} [options] Optional parameters
- * @param {string} [options.units="kilometers"] can be degrees, radians, miles, or kilometers
- * @returns {number} distance between the two points
- * @example
- * var from = turf.point([-75.343, 39.984]);
- * var to = turf.point([-75.534, 39.123]);
- * var options = {units: 'miles'};
- *
- * var distance = turf.rhumbDistance(from, to, options);
- *
- * //addToMap
- * var addToMap = [from, to];
- * from.properties.distance = distance;
- * to.properties.distance = distance;
- */
- function rhumbDistance(from, to, options = {}) {
- const origin = getCoord(from);
- const destination = getCoord(to);
- // compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)
- // solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678
- destination[0] +=
- destination[0] - origin[0] > 180
- ? -360
- : origin[0] - destination[0] > 180
- ? 360
- : 0;
- const distanceInMeters = calculateRhumbDistance(origin, destination);
- const distance = convertLength$1(distanceInMeters, "meters", options.units);
- return distance;
+ const phi1 = degreesToRadians(from[1]);
+ const phi2 = degreesToRadians(to[1]);
+ let deltaLambda = degreesToRadians(to[0] - from[0]);
+ if (deltaLambda > Math.PI) {
+ deltaLambda -= 2 * Math.PI;
+ }
+ if (deltaLambda < -Math.PI) {
+ deltaLambda += 2 * Math.PI;
+ }
+ const deltaPsi = Math.log(
+ Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4)
+ );
+ const theta = Math.atan2(deltaLambda, deltaPsi);
+ return (radiansToDegrees(theta) + 360) % 360;
}
- /**
- * Returns the distance travelling from ‘this’ point to destination point along a rhumb line.
- * Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
- *
- * @private
- * @param {Array} origin point.
- * @param {Array} destination point.
- * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).
- * @returns {number} Distance in km between this point and destination point (same units as radius).
- *
- * @example
- * var p1 = new LatLon(51.127, 1.338);
- * var p2 = new LatLon(50.964, 1.853);
- * var d = p1.distanceTo(p2); // 40.31 km
- */
+ __name$a(calculateRhumbBearing, "calculateRhumbBearing");
+ var turf_rhumb_bearing_default = rhumbBearing;
+
+ var __defProp$9 = Object.defineProperty;
+ var __name$9 = (target, value) => __defProp$9(target, "name", { value, configurable: true });
+ function rhumbDistance(from, to, options = {}) {
+ const origin = getCoord(from);
+ const destination = getCoord(to);
+ destination[0] += destination[0] - origin[0] > 180 ? -360 : origin[0] - destination[0] > 180 ? 360 : 0;
+ const distanceInMeters = calculateRhumbDistance(origin, destination);
+ const distance = convertLength(distanceInMeters, "meters", options.units);
+ return distance;
+ }
+ __name$9(rhumbDistance, "rhumbDistance");
function calculateRhumbDistance(origin, destination, radius) {
- // φ => phi
- // λ => lambda
- // ψ => psi
- // Δ => Delta
- // δ => delta
- // θ => theta
- radius = radius === undefined ? earthRadius$1 : Number(radius);
- // see www.edwilliams.org/avform.htm#Rhumb
- const R = radius;
- const phi1 = (origin[1] * Math.PI) / 180;
- const phi2 = (destination[1] * Math.PI) / 180;
- const DeltaPhi = phi2 - phi1;
- let DeltaLambda = (Math.abs(destination[0] - origin[0]) * Math.PI) / 180;
- // if dLon over 180° take shorter rhumb line across the anti-meridian:
- if (DeltaLambda > Math.PI) {
- DeltaLambda -= 2 * Math.PI;
- }
- // on Mercator projection, longitude distances shrink by latitude; q is the 'stretch factor'
- // q becomes ill-conditioned along E-W line (0/0); use empirical tolerance to avoid it
- const DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
- const q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1);
- // distance is pythagoras on 'stretched' Mercator projection
- const delta = Math.sqrt(DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda); // angular distance in radians
- const dist = delta * R;
- return dist;
+ radius = radius === void 0 ? earthRadius : Number(radius);
+ const R = radius;
+ const phi1 = origin[1] * Math.PI / 180;
+ const phi2 = destination[1] * Math.PI / 180;
+ const DeltaPhi = phi2 - phi1;
+ let DeltaLambda = Math.abs(destination[0] - origin[0]) * Math.PI / 180;
+ if (DeltaLambda > Math.PI) {
+ DeltaLambda -= 2 * Math.PI;
+ }
+ const DeltaPsi = Math.log(
+ Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4)
+ );
+ const q = Math.abs(DeltaPsi) > 1e-11 ? DeltaPhi / DeltaPsi : Math.cos(phi1);
+ const delta = Math.sqrt(
+ DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda
+ );
+ const dist = delta * R;
+ return dist;
}
+ __name$9(calculateRhumbDistance, "calculateRhumbDistance");
+ var turf_rhumb_distance_default = rhumbDistance;
- var __defProp$3 = Object.defineProperty;
- var __name$3 = (target, value) => __defProp$3(target, "name", { value, configurable: true });
+ var __defProp$8 = Object.defineProperty;
+ var __name$8 = (target, value) => __defProp$8(target, "name", { value, configurable: true });
function rhumbDestination(origin, distance, bearing, options = {}) {
const wasNegativeDistance = distance < 0;
let distanceInMeters = convertLength(
@@ -8143,7 +7771,7 @@
destination[0] += destination[0] - coords[0] > 180 ? -360 : coords[0] - destination[0] > 180 ? 360 : 0;
return point(destination, options.properties);
}
- __name$3(rhumbDestination, "rhumbDestination");
+ __name$8(rhumbDestination, "rhumbDestination");
function calculateRhumbDestination(origin, distance, bearing, radius) {
radius = radius === void 0 ? earthRadius : Number(radius);
const delta = distance / radius;
@@ -8166,11 +7794,10 @@
phi2 * 180 / Math.PI
];
}
- __name$3(calculateRhumbDestination, "calculateRhumbDestination");
- var turf_rhumb_destination_default = rhumbDestination;
+ __name$8(calculateRhumbDestination, "calculateRhumbDestination");
- var __defProp$2 = Object.defineProperty;
- var __name$2 = (target, value) => __defProp$2(target, "name", { value, configurable: true });
+ var __defProp$7 = Object.defineProperty;
+ var __name$7 = (target, value) => __defProp$7(target, "name", { value, configurable: true });
// index.ts
function clone(geojson) {
@@ -8194,7 +7821,7 @@
throw new Error("unknown GeoJSON type");
}
}
- __name$2(clone, "clone");
+ __name$7(clone, "clone");
function cloneFeature(geojson) {
const cloned = { type: "Feature" };
Object.keys(geojson).forEach((key) => {
@@ -8215,7 +7842,7 @@
}
return cloned;
}
- __name$2(cloneFeature, "cloneFeature");
+ __name$7(cloneFeature, "cloneFeature");
function cloneProperties(properties) {
const cloned = {};
if (!properties) {
@@ -8239,7 +7866,7 @@
});
return cloned;
}
- __name$2(cloneProperties, "cloneProperties");
+ __name$7(cloneProperties, "cloneProperties");
function cloneFeatureCollection(geojson) {
const cloned = { type: "FeatureCollection" };
Object.keys(geojson).forEach((key) => {
@@ -8256,7 +7883,7 @@
});
return cloned;
}
- __name$2(cloneFeatureCollection, "cloneFeatureCollection");
+ __name$7(cloneFeatureCollection, "cloneFeatureCollection");
function cloneGeometry(geometry) {
const geom = { type: geometry.type };
if (geometry.bbox) {
@@ -8271,7 +7898,7 @@
geom.coordinates = deepSlice(geometry.coordinates);
return geom;
}
- __name$2(cloneGeometry, "cloneGeometry");
+ __name$7(cloneGeometry, "cloneGeometry");
function deepSlice(coords) {
const cloned = coords;
if (typeof cloned[0] !== "object") {
@@ -8281,115 +7908,63 @@
return deepSlice(coord);
});
}
- __name$2(deepSlice, "deepSlice");
- var turf_clone_default = clone;
+ __name$7(deepSlice, "deepSlice");
- /**
- * Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point.
- *
- * @name transformRotate
- * @param {GeoJSON} geojson object to be rotated
- * @param {number} angle of rotation in decimal degrees, positive clockwise
- * @param {Object} [options={}] Optional parameters
- * @param {Coord} [options.pivot='centroid'] point around which the rotation will be performed
- * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
- * @returns {GeoJSON} the rotated GeoJSON feature
- * @example
- * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
- * var options = {pivot: [0, 25]};
- * var rotatedPoly = turf.transformRotate(poly, 10, options);
- *
- * //addToMap
- * var addToMap = [poly, rotatedPoly];
- * rotatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};
- */
+ var __defProp$6 = Object.defineProperty;
+ var __name$6 = (target, value) => __defProp$6(target, "name", { value, configurable: true });
function transformRotate(geojson, angle, options) {
- // Optional parameters
options = options || {};
- if (!isObject$2(options)) throw new Error("options is invalid");
+ if (!isObject(options))
+ throw new Error("options is invalid");
var pivot = options.pivot;
var mutate = options.mutate;
-
- // Input validation
- if (!geojson) throw new Error("geojson is required");
- if (angle === undefined || angle === null || isNaN(angle))
+ if (!geojson)
+ throw new Error("geojson is required");
+ if (angle === void 0 || angle === null || isNaN(angle))
throw new Error("angle is required");
-
- // Shortcut no-rotation
- if (angle === 0) return geojson;
-
- // Use centroid of GeoJSON if pivot is not provided
- if (!pivot) pivot = centroid(geojson);
-
- // Clone geojson to avoid side effects
- if (mutate === false || mutate === undefined) geojson = turf_clone_default(geojson);
-
- // Rotate each coordinate
- coordEach(geojson, function (pointCoords) {
+ if (angle === 0)
+ return geojson;
+ if (!pivot)
+ pivot = centroid(geojson);
+ if (mutate === false || mutate === void 0)
+ geojson = clone(geojson);
+ coordEach(geojson, function(pointCoords) {
var initialAngle = rhumbBearing(pivot, pointCoords);
var finalAngle = initialAngle + angle;
var distance = rhumbDistance(pivot, pointCoords);
- var newCoords = getCoords(turf_rhumb_destination_default(pivot, distance, finalAngle));
+ var newCoords = getCoords(rhumbDestination(pivot, distance, finalAngle));
pointCoords[0] = newCoords[0];
pointCoords[1] = newCoords[1];
});
return geojson;
}
+ __name$6(transformRotate, "transformRotate");
+ var turf_transform_rotate_default = transformRotate;
- // http://en.wikipedia.org/wiki/Haversine_formula
- // http://www.movable-type.co.uk/scripts/latlong.html
- /**
- * Takes two {@link Point|points} and finds the geographic bearing between them,
- * i.e. the angle measured in degrees from the north line (0 degrees)
- *
- * @name bearing
- * @param {Coord} start starting Point
- * @param {Coord} end ending Point
- * @param {Object} [options={}] Optional parameters
- * @param {boolean} [options.final=false] calculates the final bearing if true
- * @returns {number} bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)
- * @example
- * var point1 = turf.point([-75.343, 39.984]);
- * var point2 = turf.point([-75.534, 39.123]);
- *
- * var bearing = turf.bearing(point1, point2);
- *
- * //addToMap
- * var addToMap = [point1, point2]
- * point1.properties['marker-color'] = '#f00'
- * point2.properties['marker-color'] = '#0f0'
- * point1.properties.bearing = bearing
- */
+ var __defProp$5 = Object.defineProperty;
+ var __name$5 = (target, value) => __defProp$5(target, "name", { value, configurable: true });
function bearing(start, end, options = {}) {
- // Reverse calculation
- if (options.final === true) {
- return calculateFinalBearing(start, end);
- }
- const coordinates1 = getCoord(start);
- const coordinates2 = getCoord(end);
- const lon1 = degreesToRadians$1(coordinates1[0]);
- const lon2 = degreesToRadians$1(coordinates2[0]);
- const lat1 = degreesToRadians$1(coordinates1[1]);
- const lat2 = degreesToRadians$1(coordinates2[1]);
- const a = Math.sin(lon2 - lon1) * Math.cos(lat2);
- const b = Math.cos(lat1) * Math.sin(lat2) -
- Math.sin(lat1) * Math.cos(lat2) * Math.cos(lon2 - lon1);
- return radiansToDegrees$1(Math.atan2(a, b));
- }
- /**
- * Calculates Final Bearing
- *
- * @private
- * @param {Coord} start starting Point
- * @param {Coord} end ending Point
- * @returns {number} bearing
- */
+ if (options.final === true) {
+ return calculateFinalBearing(start, end);
+ }
+ const coordinates1 = getCoord(start);
+ const coordinates2 = getCoord(end);
+ const lon1 = degreesToRadians(coordinates1[0]);
+ const lon2 = degreesToRadians(coordinates2[0]);
+ const lat1 = degreesToRadians(coordinates1[1]);
+ const lat2 = degreesToRadians(coordinates2[1]);
+ const a = Math.sin(lon2 - lon1) * Math.cos(lat2);
+ const b = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(lon2 - lon1);
+ return radiansToDegrees(Math.atan2(a, b));
+ }
+ __name$5(bearing, "bearing");
function calculateFinalBearing(start, end) {
- // Swap start & end
- let bear = bearing(end, start);
- bear = (bear + 180) % 360;
- return bear;
+ let bear = bearing(end, start);
+ bear = (bear + 180) % 360;
+ return bear;
}
+ __name$5(calculateFinalBearing, "calculateFinalBearing");
+ var turf_bearing_default = bearing;
class Rotate {
/**
@@ -8429,7 +8004,7 @@
onPointerDown = (event) => {
event.preventDefault();
const geojson = this.raster.polygonSource.source.data;
- this.centroid = /** @type {[number, number]} */ (centroid(geojson).geometry.coordinates);
+ this.centroid = /** @type {[number, number]} */ (turf_centroid_default(geojson).geometry.coordinates);
this.startPoint = [event.lngLat.lng, event.lngLat.lat];
this.map.on('mousemove', this.onPointerMove);
document.addEventListener('pointerup', this.onPointerUp, { once: true });
@@ -8443,11 +8018,11 @@
if (!this.startPoint) throw Error('previous position is undefined');
/** @type {[number, number]} */
const currentPosition = [event.lngLat.lng, event.lngLat.lat];
- const azimuthA = bearingToAzimuth$1(bearing(this.startPoint, this.centroid));
- const azimuthB = bearingToAzimuth$1(bearing(currentPosition, this.centroid));
+ const azimuthA = bearingToAzimuth(turf_bearing_default(this.startPoint, this.centroid));
+ const azimuthB = bearingToAzimuth(turf_bearing_default(currentPosition, this.centroid));
const delta = azimuthB - azimuthA;
const geojson = this.raster.polygonSource.source.data;
- const transformed = transformRotate(geojson, delta);
+ const transformed = turf_transform_rotate_default(geojson, delta);
const position = /** @type {[number, number][]} */ (transformed.geometry.coordinates[0]);
this.onUpdate(position.slice(0, 4));
this.startPoint = currentPosition;
@@ -8470,8 +8045,8 @@
}
}
- var __defProp$1 = Object.defineProperty;
- var __name$1 = (target, value) => __defProp$1(target, "name", { value, configurable: true });
+ var __defProp$4 = Object.defineProperty;
+ var __name$4 = (target, value) => __defProp$4(target, "name", { value, configurable: true });
function bbox(geojson, options = {}) {
if (geojson.bbox != null && true !== options.recompute) {
return geojson.bbox;
@@ -8493,148 +8068,95 @@
});
return result;
}
- __name$1(bbox, "bbox");
- var turf_bbox_default = bbox;
+ __name$4(bbox, "bbox");
- var __defProp = Object.defineProperty;
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+ var __defProp$3 = Object.defineProperty;
+ var __name$3 = (target, value) => __defProp$3(target, "name", { value, configurable: true });
function center(geojson, options = {}) {
const ext = bbox(geojson);
const x = (ext[0] + ext[2]) / 2;
const y = (ext[1] + ext[3]) / 2;
return point([x, y], options.properties, options);
}
- __name(center, "center");
- var turf_center_default = center;
+ __name$3(center, "center");
- /**
- * Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger).
- * If a FeatureCollection is provided, the origin point will be calculated based on each individual Feature.
- *
- * @name transformScale
- * @param {GeoJSON} geojson GeoJSON to be scaled
- * @param {number} factor of scaling, positive values greater than 0. Numbers between 0 and 1 will shrink the geojson, numbers greater than 1 will expand it, a factor of 1 will not change the geojson.
- * @param {Object} [options={}] Optional parameters
- * @param {string|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
- * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
- * @returns {GeoJSON} scaled GeoJSON
- * @example
- * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
- * var scaledPoly = turf.transformScale(poly, 3);
- *
- * //addToMap
- * var addToMap = [poly, scaledPoly];
- * scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};
- */
+ var __defProp$2 = Object.defineProperty;
+ var __name$2 = (target, value) => __defProp$2(target, "name", { value, configurable: true });
function transformScale(geojson, factor, options) {
- // Optional parameters
options = options || {};
- if (!isObject$2(options)) throw new Error("options is invalid");
+ if (!isObject(options))
+ throw new Error("options is invalid");
var origin = options.origin;
var mutate = options.mutate;
-
- // Input validation
- if (!geojson) throw new Error("geojson required");
+ if (!geojson)
+ throw new Error("geojson required");
if (typeof factor !== "number" || factor <= 0)
throw new Error("invalid factor");
var originIsPoint = Array.isArray(origin) || typeof origin === "object";
-
- // Clone geojson to avoid side effects
- if (mutate !== true) geojson = turf_clone_default(geojson);
-
- // Scale each Feature separately
+ if (mutate !== true)
+ geojson = clone(geojson);
if (geojson.type === "FeatureCollection" && !originIsPoint) {
- featureEach(geojson, function (feature, index) {
+ featureEach(geojson, function(feature, index) {
geojson.features[index] = scale$1(feature, factor, origin);
});
return geojson;
}
- // Scale Feature/Geometry
return scale$1(geojson, factor, origin);
}
-
- /**
- * Scale Feature/Geometry
- *
- * @private
- * @param {Feature|Geometry} feature GeoJSON Feature/Geometry
- * @param {number} factor of scaling, positive or negative values greater than 0
- * @param {string|Coord} [origin="centroid"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)
- * @returns {Feature|Geometry} scaled GeoJSON Feature/Geometry
- */
+ __name$2(transformScale, "transformScale");
function scale$1(feature, factor, origin) {
- // Default params
var isPoint = getType(feature) === "Point";
origin = defineOrigin(feature, origin);
-
- // Shortcut no-scaling
- if (factor === 1 || isPoint) return feature;
-
- // Scale each coordinate
- coordEach(feature, function (coord) {
+ if (factor === 1 || isPoint)
+ return feature;
+ coordEach(feature, function(coord) {
var originalDistance = rhumbDistance(origin, coord);
var bearing = rhumbBearing(origin, coord);
var newDistance = originalDistance * factor;
- var newCoord = getCoords(turf_rhumb_destination_default(origin, newDistance, bearing));
+ var newCoord = getCoords(rhumbDestination(origin, newDistance, bearing));
coord[0] = newCoord[0];
coord[1] = newCoord[1];
- if (coord.length === 3) coord[2] *= factor;
+ if (coord.length === 3)
+ coord[2] *= factor;
});
-
delete feature.bbox;
-
return feature;
}
-
- /**
- * Define Origin
- *
- * @private
- * @param {GeoJSON} geojson GeoJSON
- * @param {string|Coord} origin sw/se/nw/ne/center/centroid
- * @returns {Feature} Point origin
- */
+ __name$2(scale$1, "scale");
function defineOrigin(geojson, origin) {
- // Default params
- if (origin === undefined || origin === null) origin = "centroid";
-
- // Input Coord
+ if (origin === void 0 || origin === null)
+ origin = "centroid";
if (Array.isArray(origin) || typeof origin === "object")
return getCoord(origin);
-
- // Define BBox
- var bbox = geojson.bbox
- ? geojson.bbox
- : turf_bbox_default(geojson, { recalculate: true });
- var west = bbox[0];
- var south = bbox[1];
- var east = bbox[2];
- var north = bbox[3];
-
+ var bbox$1 = geojson.bbox ? geojson.bbox : bbox(geojson, { recalculate: true });
+ var west = bbox$1[0];
+ var south = bbox$1[1];
+ var east = bbox$1[2];
+ var north = bbox$1[3];
switch (origin) {
case "sw":
case "southwest":
case "westsouth":
case "bottomleft":
- return point$1([west, south]);
+ return point([west, south]);
case "se":
case "southeast":
case "eastsouth":
case "bottomright":
- return point$1([east, south]);
+ return point([east, south]);
case "nw":
case "northwest":
case "westnorth":
case "topleft":
- return point$1([west, north]);
+ return point([west, north]);
case "ne":
case "northeast":
case "eastnorth":
case "topright":
- return point$1([east, north]);
+ return point([east, north]);
case "center":
- return turf_center_default(geojson);
- case undefined:
+ return center(geojson);
+ case void 0:
case null:
case "centroid":
return centroid(geojson);
@@ -8642,6 +8164,8 @@
throw new Error("invalid origin");
}
}
+ __name$2(defineOrigin, "defineOrigin");
+ var turf_transform_scale_default = transformScale;
class Scale {
/**
@@ -8698,11 +8222,11 @@
const point0 = this.raster.coordinates[index0];
const pointA = this.raster.coordinates[this.knobIndex];
const pointB = [event.lngLat.lng, event.lngLat.lat];
- const distA0 = rhumbDistance(pointA, point0);
- const distB0 = rhumbDistance(pointB, point0);
+ const distA0 = turf_rhumb_distance_default(pointA, point0);
+ const distB0 = turf_rhumb_distance_default(pointB, point0);
const scale = distB0 / distA0;
const geojson = this.raster.polygonSource.source.data;
- const transformed = transformScale(geojson, scale, { origin: point0 });
+ const transformed = turf_transform_scale_default(geojson, scale, { origin: point0 });
const position = /** @type {[number, number][]} */ (transformed.geometry.coordinates[0]);
this.onUpdate(position.slice(0, 4));
};
@@ -8722,62 +8246,35 @@
}
}
- /**
- * Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line
- * on the provided direction angle.
- *
- * @name transformTranslate
- * @param {GeoJSON} geojson object to be translated
- * @param {number} distance length of the motion; negative values determine motion in opposite direction
- * @param {number} direction of the motion; angle from North in decimal degrees, positive clockwise
- * @param {Object} [options={}] Optional parameters
- * @param {string} [options.units='kilometers'] in which `distance` will be express; miles, kilometers, degrees, or radians
- * @param {number} [options.zTranslation=0] length of the vertical motion, same unit of distance
- * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)
- * @returns {GeoJSON} the translated GeoJSON object
- * @example
- * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);
- * var translatedPoly = turf.transformTranslate(poly, 100, 35);
- *
- * //addToMap
- * var addToMap = [poly, translatedPoly];
- * translatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};
- */
+ var __defProp$1 = Object.defineProperty;
+ var __name$1 = (target, value) => __defProp$1(target, "name", { value, configurable: true });
function transformTranslate(geojson, distance, direction, options) {
- // Optional parameters
options = options || {};
- if (!isObject$2(options)) throw new Error("options is invalid");
+ if (!isObject(options))
+ throw new Error("options is invalid");
var units = options.units;
var zTranslation = options.zTranslation;
var mutate = options.mutate;
-
- // Input validation
- if (!geojson) throw new Error("geojson is required");
- if (distance === undefined || distance === null || isNaN(distance))
+ if (!geojson)
+ throw new Error("geojson is required");
+ if (distance === void 0 || distance === null || isNaN(distance))
throw new Error("distance is required");
if (zTranslation && typeof zTranslation !== "number" && isNaN(zTranslation))
throw new Error("zTranslation is not a number");
-
- // Shortcut no-motion
- zTranslation = zTranslation !== undefined ? zTranslation : 0;
- if (distance === 0 && zTranslation === 0) return geojson;
-
- if (direction === undefined || direction === null || isNaN(direction))
+ zTranslation = zTranslation !== void 0 ? zTranslation : 0;
+ if (distance === 0 && zTranslation === 0)
+ return geojson;
+ if (direction === void 0 || direction === null || isNaN(direction))
throw new Error("direction is required");
-
- // Invert with negative distances
if (distance < 0) {
distance = -distance;
direction = direction + 180;
}
-
- // Clone geojson to avoid side effects
- if (mutate === false || mutate === undefined) geojson = turf_clone_default(geojson);
-
- // Translate each coordinate
- coordEach(geojson, function (pointCoords) {
+ if (mutate === false || mutate === void 0)
+ geojson = clone(geojson);
+ coordEach(geojson, function(pointCoords) {
var newCoords = getCoords(
- turf_rhumb_destination_default(pointCoords, distance, direction, { units: units })
+ rhumbDestination(pointCoords, distance, direction, { units })
);
pointCoords[0] = newCoords[0];
pointCoords[1] = newCoords[1];
@@ -8786,6 +8283,8 @@
});
return geojson;
}
+ __name$1(transformTranslate, "transformTranslate");
+ var turf_transform_translate_default = transformTranslate;
class Move {
/**
@@ -8834,10 +8333,10 @@
if (!this.prevPosition) throw Error('previous position is undefined');
/** @type {[number, number]} */
const currentPosition = [event.lngLat.lng, event.lngLat.lat];
- const bearingBetween = rhumbBearing(this.prevPosition, currentPosition);
- const distanceBetween = rhumbDistance(this.prevPosition, currentPosition);
+ const bearingBetween = turf_rhumb_bearing_default(this.prevPosition, currentPosition);
+ const distanceBetween = turf_rhumb_distance_default(this.prevPosition, currentPosition);
const geojson = this.raster.polygonSource.source.data;
- const transformed = transformTranslate(geojson, distanceBetween, bearingBetween);
+ const transformed = turf_transform_translate_default(geojson, distanceBetween, bearingBetween);
const position = /** @type {[number, number][]} */ (transformed.geometry.coordinates[0]);
this.onUpdate(position.slice(0, 4));
this.prevPosition = currentPosition;
@@ -8905,7 +8404,7 @@
* }}
*/
get polygonSource() {
- const feature = polygon$2([[...this.coordinates, this.coordinates[0]]], { id: this.id });
+ const feature = polygon$1([[...this.coordinates, this.coordinates[0]]], { id: this.id });
return {
id: `$polygon:${this.id}`,
source: {
@@ -8925,12 +8424,12 @@
* }}
*/
get pointsSource() {
- const features = this.coordinates.map((coordinate, index) => point$1(coordinate, { index }));
+ const features = this.coordinates.map((coordinate, index) => point(coordinate, { index }));
return {
id: `$points:${this.id}`,
source: {
type: 'geojson',
- data: featureCollection$1(features),
+ data: featureCollection(features),
},
};
}
@@ -8998,39 +8497,49 @@
}
}
- const image$1 = parseSVG(`
-
-`);
-
- const move = parseSVG(`
-
-`);
-
- const scale = parseSVG(`
-
-`);
-
- const rotate = parseSVG(`
-
-`);
-
- const remove = parseSVG(`
-
-`);
+ function image$1() {
+ return parseSVG(`
+
+ `);
+ }
+
+ function move() {
+ return parseSVG(`
+
+ `);
+ }
+
+ function scale() {
+ return parseSVG(`
+
+ `);
+ }
+
+ function rotate() {
+ return parseSVG(`
+
+ `);
+ }
+
+ function remove() {
+ return parseSVG(`
+
+ `);
+ }
const icons$4 = {
move,
@@ -9053,33 +8562,33 @@
this.fileInput = createFileInput();
this.buttonAdd = controlButton({
title: 'Add image',
- icon: icons$4.image,
+ icon: icons$4.image(),
className: 'mapbox-ctrl-image-add',
onClick: () => this.fileInput.click(),
});
this.buttonMove = controlButton({
disabled: true,
title: 'Move image',
- icon: icons$4.move,
+ icon: icons$4.move(),
onClick: () => this.setMode('move'),
});
this.buttonScale = controlButton({
disabled: true,
title: 'Scale image',
- icon: icons$4.scale,
+ icon: icons$4.scale(),
onClick: () => this.setMode('scale'),
});
this.buttonRotate = controlButton({
disabled: true,
title: 'Rotate image',
- icon: icons$4.rotate,
+ icon: icons$4.rotate(),
onClick: () => this.setMode('rotate'),
});
if (options.removeButton) {
this.buttonRemove = controlButton({
hidden: true,
title: 'Remove image',
- icon: icons$4.remove,
+ icon: icons$4.remove(),
onClick: () => this.removeRaster(),
});
}
@@ -9253,7 +8762,7 @@
onMapClick = (event) => {
if (!this.map) throw Error('map is undefined');
const layersId = Object.values(this.rasters).map((i) => i.fillLayer.id);
- // sometimes layers are removed from the map without destroing the control, e.g. style was changed
+ // sometimes layers are removed from the map without destroying the control, e.g. style was changed
const errorLayerId = layersId.find((id) => {
return !this.map?.getLayer(id);
});
@@ -9324,12 +8833,14 @@
}
}
- const inspect = parseSVG(`
-
-`);
+ function inspect() {
+ return parseSVG(`
+
+ `);
+ }
const icons$3 = {
inspect,
@@ -9443,7 +8954,7 @@
this.container = controlContainer('mapbox-ctrl-inspect');
this.button = controlButton({
title: 'Inspect',
- icon: icons$3.inspect,
+ icon: icons$3.inspect(),
onClick: () => this.onControlButtonClick(),
});
this.isActive = false;
@@ -9654,52 +9165,36 @@
}
}
- const ruler = parseSVG(`
-
-`);
+ function ruler() {
+ return parseSVG(`
+
+ `);
+ }
const icons$2 = {
ruler,
};
- //http://en.wikipedia.org/wiki/Haversine_formula
- //http://www.movable-type.co.uk/scripts/latlong.html
- /**
- * Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.
- * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.
- *
- * @name distance
- * @param {Coord | Point} from origin point or coordinate
- * @param {Coord | Point} to destination point or coordinate
- * @param {Object} [options={}] Optional parameters
- * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers
- * @returns {number} distance between the two points
- * @example
- * var from = turf.point([-75.343, 39.984]);
- * var to = turf.point([-75.534, 39.123]);
- * var options = {units: 'miles'};
- *
- * var distance = turf.distance(from, to, options);
- *
- * //addToMap
- * var addToMap = [from, to];
- * from.properties.distance = distance;
- * to.properties.distance = distance;
- */
+ var __defProp = Object.defineProperty;
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
function distance(from, to, options = {}) {
- var coordinates1 = getCoord(from);
- var coordinates2 = getCoord(to);
- var dLat = degreesToRadians$1(coordinates2[1] - coordinates1[1]);
- var dLon = degreesToRadians$1(coordinates2[0] - coordinates1[0]);
- var lat1 = degreesToRadians$1(coordinates1[1]);
- var lat2 = degreesToRadians$1(coordinates2[1]);
- var a = Math.pow(Math.sin(dLat / 2), 2) +
- Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);
- return radiansToLength$1(2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), options.units);
+ var coordinates1 = getCoord(from);
+ var coordinates2 = getCoord(to);
+ var dLat = degreesToRadians(coordinates2[1] - coordinates1[1]);
+ var dLon = degreesToRadians(coordinates2[0] - coordinates1[0]);
+ var lat1 = degreesToRadians(coordinates1[1]);
+ var lat2 = degreesToRadians(coordinates2[1]);
+ var a = Math.pow(Math.sin(dLat / 2), 2) + Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);
+ return radiansToLength(
+ 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)),
+ options.units
+ );
}
+ __name(distance, "distance");
+ var turf_distance_default = distance;
/** @param {number} value */
function defaultLabelFormat(value) {
@@ -9744,7 +9239,7 @@
type: 'FeatureCollection',
features: coordinates.map((coordinate, index) => {
if (index > 0) {
- sum += distance(coordinates[index - 1], coordinate, { units });
+ sum += turf_distance_default(coordinates[index - 1], coordinate, { units });
}
return {
type: 'Feature',
@@ -9842,7 +9337,7 @@
if (!this.options.invisible) {
this.button = controlButton({
title: 'Ruler',
- icon: icons$2.ruler,
+ icon: icons$2.ruler(),
onClick: () => this.onControlButtonClick(),
});
}
@@ -9996,7 +9491,7 @@
/** @param {MapLayerMouseEvent | MapLayerTouchEvent} event */
function onStart(event) {
- // do not block multitouch actions
+ // do not block multi-touch actions
if (event.type === 'touchstart' && event.points.length !== 1) {
return;
}
@@ -10075,11 +9570,13 @@
}
}
- const layers = parseSVG(`
-
-`);
+ function layers() {
+ return parseSVG(`
+
+ `);
+ }
const icons$1 = {
layers,
@@ -10179,7 +9676,7 @@
compact() {
if (!this.map) throw Error('map is undefined');
- const button = controlButton({ title: 'Styles', icon: icons$1.layers });
+ const button = controlButton({ title: 'Styles', icon: icons$1.layers() });
const select = document.createElement('select');
this.container.appendChild(button);
button.appendChild(select);
@@ -10315,19 +9812,23 @@
}
}
- const plus = parseSVG(`
-
-`);
+ function plus() {
+ return parseSVG(`
+
+ `);
+ }
- const minus = parseSVG(`
-
-`);
+ function minus() {
+ return parseSVG(`
+
+ `);
+ }
const icons = {
plus,
@@ -10339,12 +9840,12 @@
this.container = controlContainer('mapbox-ctrl-zoom');
this.buttonIn = controlButton({
title: 'Zoom In',
- icon: icons.plus,
+ icon: icons.plus(),
onClick: () => this.map?.zoomIn(),
});
this.buttonOut = controlButton({
title: 'Zoom Out',
- icon: icons.minus,
+ icon: icons.minus(),
onClick: () => this.map?.zoomOut(),
});
}