@performant-software/geospatial 3.1.18-beta.4 → 3.1.18-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs13.js.map +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs18.js +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs190.js +1 -1
- package/dist/index.cjs190.js.map +1 -1
- package/dist/index.cjs191.js +1 -1
- package/dist/index.cjs191.js.map +1 -1
- package/dist/index.cjs192.js +1 -1
- package/dist/index.cjs192.js.map +1 -1
- package/dist/index.cjs193.js +1 -1
- package/dist/index.cjs193.js.map +1 -1
- package/dist/index.cjs194.js +1 -1
- package/dist/index.cjs194.js.map +1 -1
- package/dist/index.cjs195.js +1 -1
- package/dist/index.cjs195.js.map +1 -1
- package/dist/index.cjs196.js +1 -1
- package/dist/index.cjs196.js.map +1 -1
- package/dist/index.cjs197.js +1 -1
- package/dist/index.cjs197.js.map +1 -1
- package/dist/index.cjs198.js +1 -1
- package/dist/index.cjs198.js.map +1 -1
- package/dist/index.cjs199.js +1 -1
- package/dist/index.cjs199.js.map +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs200.js +1 -1
- package/dist/index.cjs200.js.map +1 -1
- package/dist/index.cjs201.js +1 -1
- package/dist/index.cjs201.js.map +1 -1
- package/dist/index.cjs202.js +1 -1
- package/dist/index.cjs202.js.map +1 -1
- package/dist/index.cjs203.js +1 -1
- package/dist/index.cjs203.js.map +1 -1
- package/dist/index.cjs204.js +1 -1
- package/dist/index.cjs204.js.map +1 -1
- package/dist/index.cjs205.js +1 -1
- package/dist/index.cjs205.js.map +1 -1
- package/dist/index.cjs206.js +1 -1
- package/dist/index.cjs206.js.map +1 -1
- package/dist/index.cjs207.js +1 -1
- package/dist/index.cjs207.js.map +1 -1
- package/dist/index.cjs208.js +1 -1
- package/dist/index.cjs208.js.map +1 -1
- package/dist/index.cjs209.js +1 -1
- package/dist/index.cjs209.js.map +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs210.js +1 -1
- package/dist/index.cjs210.js.map +1 -1
- package/dist/index.cjs211.js +1 -1
- package/dist/index.cjs211.js.map +1 -1
- package/dist/index.cjs212.js +1 -1
- package/dist/index.cjs212.js.map +1 -1
- package/dist/index.cjs215.js +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs23.js +1 -1
- package/dist/index.cjs235.js +1 -1
- package/dist/index.cjs24.js +1 -1
- package/dist/index.cjs240.js +7 -1
- package/dist/index.cjs240.js.map +1 -1
- package/dist/index.cjs241.js +1 -1
- package/dist/index.cjs241.js.map +1 -1
- package/dist/index.cjs242.js +1 -7
- package/dist/index.cjs242.js.map +1 -1
- package/dist/index.cjs243.js +1 -1
- package/dist/index.cjs243.js.map +1 -1
- package/dist/index.cjs244.js +1 -1
- package/dist/index.cjs244.js.map +1 -1
- package/dist/index.cjs246.js +1 -1
- package/dist/index.cjs246.js.map +1 -1
- package/dist/index.cjs248.js +1 -1
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs251.js +1 -1
- package/dist/index.cjs252.js +1 -1
- package/dist/index.cjs257.js +1 -1
- package/dist/index.cjs258.js +1 -1
- package/dist/index.cjs259.js +1 -1
- package/dist/index.cjs26.js +1 -1
- package/dist/index.cjs262.js +1 -1
- package/dist/index.cjs263.js +1 -1
- package/dist/index.cjs265.js +1 -1
- package/dist/index.cjs265.js.map +1 -1
- package/dist/index.cjs266.js +1 -1
- package/dist/index.cjs266.js.map +1 -1
- package/dist/index.cjs268.js +1 -1
- package/dist/index.cjs268.js.map +1 -1
- package/dist/index.cjs27.js +1 -1
- package/dist/index.cjs32.js +1 -1
- package/dist/index.cjs34.js +1 -1
- package/dist/index.cjs35.js +1 -1
- package/dist/index.cjs39.js +1 -1
- package/dist/index.cjs69.js +1 -1
- package/dist/index.cjs71.js +1 -1
- package/dist/index.cjs73.js +1 -743
- package/dist/index.cjs73.js.map +1 -1
- package/dist/index.cjs75.js +9 -1
- package/dist/index.cjs75.js.map +1 -1
- package/dist/index.cjs76.js +17 -1
- package/dist/index.cjs76.js.map +1 -1
- package/dist/index.cjs77.js +1 -9
- package/dist/index.cjs77.js.map +1 -1
- package/dist/index.cjs78.js +1 -17
- package/dist/index.cjs78.js.map +1 -1
- package/dist/index.cjs82.js +743 -1
- package/dist/index.cjs82.js.map +1 -1
- package/dist/index.cjs83.js +1 -1
- package/dist/index.cjs83.js.map +1 -1
- package/dist/index.es13.js +64 -48
- package/dist/index.es13.js.map +1 -1
- package/dist/index.es15.js +1 -1
- package/dist/index.es16.js +4 -4
- package/dist/index.es17.js +3 -3
- package/dist/index.es18.js +3 -3
- package/dist/index.es19.js +1 -1
- package/dist/index.es190.js +144 -239
- package/dist/index.es190.js.map +1 -1
- package/dist/index.es191.js +6 -42
- package/dist/index.es191.js.map +1 -1
- package/dist/index.es192.js +5 -3
- package/dist/index.es192.js.map +1 -1
- package/dist/index.es193.js +3 -13
- package/dist/index.es193.js.map +1 -1
- package/dist/index.es194.js +3 -13
- package/dist/index.es194.js.map +1 -1
- package/dist/index.es195.js +33 -28
- package/dist/index.es195.js.map +1 -1
- package/dist/index.es196.js +3 -16
- package/dist/index.es196.js.map +1 -1
- package/dist/index.es197.js +22 -4
- package/dist/index.es197.js.map +1 -1
- package/dist/index.es198.js +2 -150
- package/dist/index.es198.js.map +1 -1
- package/dist/index.es199.js +3 -9
- package/dist/index.es199.js.map +1 -1
- package/dist/index.es2.js +3 -3
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es20.js +1 -1
- package/dist/index.es200.js +2 -7
- package/dist/index.es200.js.map +1 -1
- package/dist/index.es201.js +33 -3
- package/dist/index.es201.js.map +1 -1
- package/dist/index.es202.js +14 -2
- package/dist/index.es202.js.map +1 -1
- package/dist/index.es203.js +13 -35
- package/dist/index.es203.js.map +1 -1
- package/dist/index.es204.js +11 -3
- package/dist/index.es204.js.map +1 -1
- package/dist/index.es205.js +242 -22
- package/dist/index.es205.js.map +1 -1
- package/dist/index.es206.js +45 -2
- package/dist/index.es206.js.map +1 -1
- package/dist/index.es207.js +5 -3
- package/dist/index.es207.js.map +1 -1
- package/dist/index.es208.js +13 -2
- package/dist/index.es208.js.map +1 -1
- package/dist/index.es209.js +10 -30
- package/dist/index.es209.js.map +1 -1
- package/dist/index.es21.js +1 -1
- package/dist/index.es210.js +31 -13
- package/dist/index.es210.js.map +1 -1
- package/dist/index.es211.js +13 -13
- package/dist/index.es211.js.map +1 -1
- package/dist/index.es212.js +4 -8
- package/dist/index.es212.js.map +1 -1
- package/dist/index.es215.js +1 -1
- package/dist/index.es22.js +1 -1
- package/dist/index.es23.js +1 -1
- package/dist/index.es235.js +1 -1
- package/dist/index.es24.js +1 -1
- package/dist/index.es240.js +7506 -20
- package/dist/index.es240.js.map +1 -1
- package/dist/index.es241.js +2 -23
- package/dist/index.es241.js.map +1 -1
- package/dist/index.es242.js +20 -7506
- package/dist/index.es242.js.map +1 -1
- package/dist/index.es243.js +23 -2
- package/dist/index.es243.js.map +1 -1
- package/dist/index.es244.js +3 -8
- package/dist/index.es244.js.map +1 -1
- package/dist/index.es246.js +8 -3
- package/dist/index.es246.js.map +1 -1
- package/dist/index.es248.js +1 -1
- package/dist/index.es25.js +1 -1
- package/dist/index.es251.js +1 -1
- package/dist/index.es252.js +1 -1
- package/dist/index.es257.js +2 -2
- package/dist/index.es258.js +1 -1
- package/dist/index.es259.js +1 -1
- package/dist/index.es26.js +2 -2
- package/dist/index.es262.js +1 -1
- package/dist/index.es263.js +1 -1
- package/dist/index.es265.js +15 -2
- package/dist/index.es265.js.map +1 -1
- package/dist/index.es266.js +2 -69
- package/dist/index.es266.js.map +1 -1
- package/dist/index.es268.js +69 -15
- package/dist/index.es268.js.map +1 -1
- package/dist/index.es27.js +2 -2
- package/dist/index.es32.js +1 -1
- package/dist/index.es34.js +2 -2
- package/dist/index.es35.js +2 -2
- package/dist/index.es39.js +1 -1
- package/dist/index.es69.js +1 -1
- package/dist/index.es71.js +12 -12
- package/dist/index.es73.js +7 -21351
- package/dist/index.es73.js.map +1 -1
- package/dist/index.es75.js +25 -7
- package/dist/index.es75.js.map +1 -1
- package/dist/index.es76.js +589 -2
- package/dist/index.es76.js.map +1 -1
- package/dist/index.es77.js +104 -24
- package/dist/index.es77.js.map +1 -1
- package/dist/index.es78.js +10 -589
- package/dist/index.es78.js.map +1 -1
- package/dist/index.es82.js +21350 -104
- package/dist/index.es82.js.map +1 -1
- package/dist/index.es83.js +2 -10
- package/dist/index.es83.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CertaintyLayer.js +1 -1
- package/src/utils/Map.js +25 -6
- package/types/components/CertaintyLayer.js.flow +1 -1
- package/types/utils/Map.js.flow +25 -6
package/dist/index.cjs83.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
2
2
|
//# sourceMappingURL=index.cjs83.js.map
|
package/dist/index.cjs83.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs83.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.cjs83.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.es13.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WarpedMapLayer as
|
|
1
|
+
import { WarpedMapLayer as y } from "./index.es68.js";
|
|
2
2
|
import { bbox as m } from "./index.es69.js";
|
|
3
3
|
import { bboxPolygon as c } from "./index.es70.js";
|
|
4
|
-
import { buffer as
|
|
5
|
-
import
|
|
4
|
+
import { buffer as f } from "./index.es71.js";
|
|
5
|
+
import u from "./index.es72.js";
|
|
6
6
|
import { featureCollection as d, feature as g } from "./index.es67.js";
|
|
7
7
|
import p from "./index.es36.js";
|
|
8
8
|
import "./index.es37.js";
|
|
@@ -32,61 +32,77 @@ import "./index.es60.js";
|
|
|
32
32
|
import "./index.es61.js";
|
|
33
33
|
import "./index.es62.js";
|
|
34
34
|
import "./index.es63.js";
|
|
35
|
-
const _ = -90, L = 90, C = -180,
|
|
36
|
-
if (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
const _ = -90, L = 90, C = -180, G = 180, n = (e, o) => u(e.coordinates, o, { units: "kilometers", steps: 32 }), I = (e, o) => {
|
|
36
|
+
if (e.geometry?.type === "FeatureCollection") {
|
|
37
|
+
let t = [];
|
|
38
|
+
for (const r of e.geometry.features)
|
|
39
|
+
r.geometry?.type === "Point" && t.push({
|
|
40
|
+
...r,
|
|
41
|
+
geometry: n(r.geometry, o)
|
|
42
|
+
});
|
|
43
|
+
return {
|
|
44
|
+
...e,
|
|
45
|
+
geometry: {
|
|
46
|
+
type: "GeometryCollection",
|
|
47
|
+
geometries: t
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
} else if (e.geometry?.type === "GeometryCollection") {
|
|
51
|
+
for (const t of e.geometry.geometries)
|
|
52
|
+
if (t.type === "Point")
|
|
53
|
+
return {
|
|
54
|
+
...e,
|
|
55
|
+
geometry: n(t, o)
|
|
56
|
+
};
|
|
57
|
+
} else if (e.geometry?.type === "Point")
|
|
58
|
+
return {
|
|
59
|
+
...e,
|
|
60
|
+
geometry: n(e.geometry, o)
|
|
61
|
+
};
|
|
62
|
+
return e;
|
|
63
|
+
}, M = (e, o, t = {}) => {
|
|
64
|
+
const r = new y(o);
|
|
65
|
+
e.addLayer(r), t.url ? r.addGeoreferenceAnnotationByUrl(t.url) : t.manifest && r.addGeoreferenceAnnotation(t.manifest), t.opacity && r.setOpacity(t.opacity);
|
|
66
|
+
}, b = (e, o = null) => {
|
|
67
|
+
const t = m(e);
|
|
68
|
+
if (!l(t))
|
|
53
69
|
return null;
|
|
54
|
-
const r = c(
|
|
70
|
+
const r = c(t);
|
|
55
71
|
let i;
|
|
56
|
-
return o ? i =
|
|
57
|
-
},
|
|
72
|
+
return o ? i = f(r, o, { units: "miles" }) : i = r, m(i);
|
|
73
|
+
}, v = (e, o) => e && e.removeLayer(o), x = (e, o, t, r) => {
|
|
58
74
|
const i = {
|
|
59
|
-
id:
|
|
75
|
+
id: e.record_id,
|
|
60
76
|
ccode: [],
|
|
61
|
-
title:
|
|
62
|
-
uuid:
|
|
63
|
-
record_id:
|
|
64
|
-
name:
|
|
65
|
-
names:
|
|
66
|
-
type:
|
|
77
|
+
title: e.name,
|
|
78
|
+
uuid: e.uuid,
|
|
79
|
+
record_id: e.record_id,
|
|
80
|
+
name: e.name,
|
|
81
|
+
names: e.names?.map((s) => ({ toponym: s })),
|
|
82
|
+
type: e.type,
|
|
67
83
|
items: [o],
|
|
68
|
-
url:
|
|
84
|
+
url: e.url,
|
|
69
85
|
originalProperties: r || {}
|
|
70
|
-
},
|
|
71
|
-
return g(
|
|
72
|
-
},
|
|
86
|
+
}, a = parseInt(e.record_id, 10);
|
|
87
|
+
return g(t, i, { id: a });
|
|
88
|
+
}, A = (e) => d(e), l = (e) => p.every(e, p.isFinite), B = (e) => {
|
|
73
89
|
let o = !1;
|
|
74
|
-
if (
|
|
75
|
-
const [
|
|
76
|
-
o =
|
|
90
|
+
if (e) {
|
|
91
|
+
const [t, r] = e;
|
|
92
|
+
o = t >= _ && t <= L && r >= C && r <= G;
|
|
77
93
|
}
|
|
78
94
|
return o;
|
|
79
|
-
},
|
|
80
|
-
addGeoreferenceLayer:
|
|
81
|
-
|
|
82
|
-
getBoundingBox:
|
|
83
|
-
removeLayer:
|
|
84
|
-
toFeature:
|
|
85
|
-
toFeatureCollection:
|
|
86
|
-
validateBoundingBox:
|
|
87
|
-
validateCoordinates:
|
|
95
|
+
}, le = {
|
|
96
|
+
addGeoreferenceLayer: M,
|
|
97
|
+
toCertaintyCircle: I,
|
|
98
|
+
getBoundingBox: b,
|
|
99
|
+
removeLayer: v,
|
|
100
|
+
toFeature: x,
|
|
101
|
+
toFeatureCollection: A,
|
|
102
|
+
validateBoundingBox: l,
|
|
103
|
+
validateCoordinates: B
|
|
88
104
|
};
|
|
89
105
|
export {
|
|
90
|
-
|
|
106
|
+
le as default
|
|
91
107
|
};
|
|
92
108
|
//# sourceMappingURL=index.es13.js.map
|
package/dist/index.es13.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es13.js","sources":["../src/utils/Map.js"],"sourcesContent":["// @flow\n\nimport { WarpedMapLayer } from '@allmaps/maplibre';\nimport {\n bbox,\n bboxPolygon,\n buffer,\n feature,\n featureCollection\n} from '@turf/turf';\nimport _ from 'underscore';\nimport circle from '@turf/circle';\n\nconst MIN_LATITUDE = -90;\nconst MAX_LATITUDE = 90;\nconst MIN_LONGITUDE = -180;\nconst MAX_LONGITUDE = 180;\n\n/**\n * Returns a GeoJSON circle feature with the given center point and radius.\n * @param point - The center point of the circle.\n * @param radius - The radius of the circle in kilometers.\n * @returns {Feature<Geometry, Properties>} - The GeoJSON circle feature.\n */\nconst buildCircle = (point, radius) => (\n circle(point.coordinates, radius, { units: 'kilometers', steps: 32 })\n);\n\nconst
|
|
1
|
+
{"version":3,"file":"index.es13.js","sources":["../src/utils/Map.js"],"sourcesContent":["// @flow\n\nimport { WarpedMapLayer } from '@allmaps/maplibre';\nimport {\n bbox,\n bboxPolygon,\n buffer,\n feature,\n featureCollection\n} from '@turf/turf';\nimport _ from 'underscore';\nimport circle from '@turf/circle';\n\nconst MIN_LATITUDE = -90;\nconst MAX_LATITUDE = 90;\nconst MIN_LONGITUDE = -180;\nconst MAX_LONGITUDE = 180;\n\n/**\n * Returns a GeoJSON circle feature with the given center point and radius.\n * @param point - The center point of the circle.\n * @param radius - The radius of the circle in kilometers.\n * @returns {Feature<Geometry, Properties>} - The GeoJSON circle feature.\n */\nconst buildCircle = (point, radius) => (\n circle(point.coordinates, radius, { units: 'kilometers', steps: 32 })\n);\n\nconst toCertaintyCircle = (item, radius: number) => {\n if (item.geometry?.type === 'FeatureCollection') {\n let children = [];\n\n for (const childFeature of item.geometry.features) {\n if (childFeature.geometry?.type === 'Point') {\n children.push({\n ...childFeature,\n geometry: buildCircle(childFeature.geometry, radius)\n });\n }\n }\n\n return {\n ...item,\n geometry: {\n type: 'GeometryCollection',\n geometries: children\n }\n };\n } else if (item.geometry?.type === 'GeometryCollection') {\n for (const geometry of item.geometry.geometries) {\n if (geometry.type === 'Point') {\n return {\n ...item,\n geometry: buildCircle(geometry, radius)\n };\n }\n }\n } else if (item.geometry?.type === 'Point') {\n return {\n ...item,\n geometry: buildCircle(item.geometry, radius)\n };\n }\n\n return item;\n};\n\n/**\n * Adds the geo-referenced image layer to the passed map.\n *\n * @param map\n * @param layerId\n * @param options\n */\nconst addGeoreferenceLayer = (map, layerId, options = {}) => {\n const warpedMapLayer = new WarpedMapLayer(layerId);\n map.addLayer(warpedMapLayer);\n\n if (options.url) {\n warpedMapLayer.addGeoreferenceAnnotationByUrl(options.url);\n } else if (options.manifest) {\n warpedMapLayer.addGeoreferenceAnnotation(options.manifest);\n }\n\n if (options.opacity) {\n warpedMapLayer.setOpacity(options.opacity);\n }\n};\n\n/**\n * Returns a bounding box for the passed geometry (with optional buffer).\n *\n * @param data\n * @param bufferDistance\n *\n * @returns {BBox}\n */\nconst getBoundingBox = (data, bufferDistance = null) => {\n // Convert the GeoJSON into a bounding box\n const box = bbox(data);\n\n if (!validateBoundingBox(box)) {\n return null;\n }\n\n // Convert the bounding box to a polygon\n const polygon = bboxPolygon(box);\n\n // Create a buffer around the polygon (if a distance is provided)\n let polygonBuffer;\n\n if (bufferDistance) {\n polygonBuffer = buffer(polygon, bufferDistance, { units: 'miles' });\n } else {\n polygonBuffer = polygon;\n }\n\n // Convert the buffer to a bounding box\n return bbox(polygonBuffer);\n};\n\n/**\n * Removes a layer from the passed map.\n *\n * @param map\n * @param layerId\n *\n * @returns {*}\n */\nconst removeLayer = (map, layerId) => map && map.removeLayer(layerId);\n\n/**\n * Wraps the passed record in a feature.\n *\n * @param record\n * @param item\n * @param geometry\n * @param originalProperties\n *\n * @returns {Feature<Geometry, {\n * id: *,\n * ccode: [],\n * title: *,\n * uuid: *,\n * record_id: *,\n * name: *,\n * names: *,\n * type: *,\n * items: [*],\n * url: *\n * }>}\n */\nconst toFeature = (record: any, item: any, geometry: any, originalProperties?: any) => {\n const properties = {\n id: record.record_id,\n ccode: [],\n title: record.name,\n uuid: record.uuid,\n record_id: record.record_id,\n name: record.name,\n names: record.names?.map((toponym: string) => ({ toponym })),\n type: record.type,\n items: [item],\n url: record.url,\n originalProperties: originalProperties || {}\n };\n\n const id = parseInt(record.record_id, 10);\n return feature(geometry, properties, { id });\n};\n\n/**\n * Returns a feature collection for the passed set of features.\n *\n * @param features\n *\n * @returns {FeatureCollection<Geometry, GeoJsonProperties>}\n */\nconst toFeatureCollection = (features: Array<any>) => featureCollection(features);\n\n/**\n * Validates that the passed bounding box contains finite coordinates.\n *\n * @param boundingBox\n *\n * @returns {*}\n */\nconst validateBoundingBox = (boundingBox: Array<number>) => _.every(boundingBox, _.isFinite);\n\n/**\n * Returns true if the passed coordinates are valid.\n *\n * @param coordinates\n *\n * @returns {boolean}\n */\nconst validateCoordinates = (coordinates) => {\n let valid = false;\n\n if (coordinates) {\n const [latitude, longitude] = coordinates;\n\n valid = latitude >= MIN_LATITUDE\n && latitude <= MAX_LATITUDE\n && longitude >= MIN_LONGITUDE\n && longitude <= MAX_LONGITUDE;\n }\n\n return valid;\n};\n\nexport default {\n addGeoreferenceLayer,\n toCertaintyCircle,\n getBoundingBox,\n removeLayer,\n toFeature,\n toFeatureCollection,\n validateBoundingBox,\n validateCoordinates\n};\n"],"names":["MIN_LATITUDE","MAX_LATITUDE","MIN_LONGITUDE","MAX_LONGITUDE","buildCircle","point","radius","circle","toCertaintyCircle","item","children","childFeature","geometry","addGeoreferenceLayer","map","layerId","options","warpedMapLayer","WarpedMapLayer","getBoundingBox","data","bufferDistance","box","bbox","validateBoundingBox","polygon","bboxPolygon","polygonBuffer","buffer","removeLayer","toFeature","record","originalProperties","properties","toponym","id","feature","toFeatureCollection","features","featureCollection","boundingBox","_","validateCoordinates","coordinates","valid","latitude","longitude","MapUtils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAMA,IAAe,KACfC,IAAe,IACfC,IAAgB,MAChBC,IAAgB,KAQhBC,IAAc,CAACC,GAAOC,MAC1BC,EAAOF,EAAM,aAAaC,GAAQ,EAAE,OAAO,cAAc,OAAO,IAAI,GAGhEE,IAAoB,CAACC,GAAMH,MAAmB;AAClD,MAAIG,EAAK,UAAU,SAAS,qBAAqB;AAC/C,QAAIC,IAAW,CAAA;AAEf,eAAWC,KAAgBF,EAAK,SAAS;AACvC,MAAIE,EAAa,UAAU,SAAS,WAClCD,EAAS,KAAK;AAAA,QACZ,GAAGC;AAAA,QACH,UAAUP,EAAYO,EAAa,UAAUL,CAAM;AAAA,MAAA,CACpD;AAIL,WAAO;AAAA,MACL,GAAGG;AAAA,MACH,UAAU;AAAA,QACR,MAAM;AAAA,QACN,YAAYC;AAAA,MAAA;AAAA,IACd;AAAA,EAEJ,WAAWD,EAAK,UAAU,SAAS;AACjC,eAAWG,KAAYH,EAAK,SAAS;AACnC,UAAIG,EAAS,SAAS;AACpB,eAAO;AAAA,UACL,GAAGH;AAAA,UACH,UAAUL,EAAYQ,GAAUN,CAAM;AAAA,QAAA;AAAA,aAInCG,EAAK,UAAU,SAAS;AACjC,WAAO;AAAA,MACL,GAAGA;AAAA,MACH,UAAUL,EAAYK,EAAK,UAAUH,CAAM;AAAA,IAAA;AAI/C,SAAOG;AACT,GASMI,IAAuB,CAACC,GAAKC,GAASC,IAAU,CAAA,MAAO;AAC3D,QAAMC,IAAiB,IAAIC,EAAeH,CAAO;AACjD,EAAAD,EAAI,SAASG,CAAc,GAEvBD,EAAQ,MACVC,EAAe,+BAA+BD,EAAQ,GAAG,IAChDA,EAAQ,YACjBC,EAAe,0BAA0BD,EAAQ,QAAQ,GAGvDA,EAAQ,WACVC,EAAe,WAAWD,EAAQ,OAAO;AAE7C,GAUMG,IAAiB,CAACC,GAAMC,IAAiB,SAAS;AAEtD,QAAMC,IAAMC,EAAKH,CAAI;AAErB,MAAI,CAACI,EAAoBF,CAAG;AAC1B,WAAO;AAIT,QAAMG,IAAUC,EAAYJ,CAAG;AAG/B,MAAIK;AAEJ,SAAIN,IACFM,IAAgBC,EAAOH,GAASJ,GAAgB,EAAE,OAAO,SAAS,IAElEM,IAAgBF,GAIXF,EAAKI,CAAa;AAC3B,GAUME,IAAc,CAACf,GAAKC,MAAYD,KAAOA,EAAI,YAAYC,CAAO,GAuB9De,IAAY,CAACC,GAAatB,GAAWG,GAAeoB,MAA6B;AACrF,QAAMC,IAAa;AAAA,IACjB,IAAIF,EAAO;AAAA,IACX,OAAO,CAAA;AAAA,IACP,OAAOA,EAAO;AAAA,IACd,MAAMA,EAAO;AAAA,IACb,WAAWA,EAAO;AAAA,IAClB,MAAMA,EAAO;AAAA,IACb,OAAOA,EAAO,OAAO,IAAI,CAACG,OAAqB,EAAE,SAAAA,IAAU;AAAA,IAC3D,MAAMH,EAAO;AAAA,IACb,OAAO,CAACtB,CAAI;AAAA,IACZ,KAAKsB,EAAO;AAAA,IACZ,oBAAoBC,KAAsB,CAAA;AAAA,EAAC,GAGvCG,IAAK,SAASJ,EAAO,WAAW,EAAE;AACxC,SAAOK,EAAQxB,GAAUqB,GAAY,EAAE,IAAAE,GAAI;AAC7C,GASME,IAAsB,CAACC,MAAyBC,EAAkBD,CAAQ,GAS1Ed,IAAsB,CAACgB,MAA+BC,EAAE,MAAMD,GAAaC,EAAE,QAAQ,GASrFC,IAAsB,CAACC,MAAgB;AAC3C,MAAIC,IAAQ;AAEZ,MAAID,GAAa;AACf,UAAM,CAACE,GAAUC,CAAS,IAAIH;AAE9B,IAAAC,IAAQC,KAAY7C,KACf6C,KAAY5C,KACZ6C,KAAa5C,KACb4C,KAAa3C;AAAA,EACpB;AAEA,SAAOyC;AACT,GAEAG,KAAe;AAAA,EACb,sBAAAlC;AAAA,EACA,mBAAAL;AAAA,EACA,gBAAAW;AAAA,EACA,aAAAU;AAAA,EACA,WAAAC;AAAA,EACA,qBAAAO;AAAA,EACA,qBAAAb;AAAA,EACA,qBAAAkB;AACF;"}
|
package/dist/index.es15.js
CHANGED
package/dist/index.es16.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
2
|
import { useContext as b, useState as E, useRef as s, useEffect as v, useImperativeHandle as L, useMemo as x } from "react";
|
|
3
3
|
import { MountedMapsContext as y } from "./index.es28.js";
|
|
4
|
-
import u from "./index.
|
|
5
|
-
import I from "./index.
|
|
6
|
-
import w from "./index.
|
|
7
|
-
import C from "./index.
|
|
4
|
+
import u from "./index.es205.js";
|
|
5
|
+
import I from "./index.es206.js";
|
|
6
|
+
import w from "./index.es207.js";
|
|
7
|
+
import C from "./index.es208.js";
|
|
8
8
|
const g = i.createContext(null);
|
|
9
9
|
function R(e, f) {
|
|
10
10
|
const c = b(y), [o, M] = E(null), l = s(), { current: a } = s({ mapLib: null, map: null });
|
package/dist/index.es17.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as k from "react";
|
|
2
2
|
import { memo as A, forwardRef as D, useContext as N, useRef as b, useMemo as y, useEffect as h, useImperativeHandle as M } from "react";
|
|
3
3
|
import { createPortal as w } from "react-dom";
|
|
4
|
-
import { applyReactStyle as x } from "./index.
|
|
4
|
+
import { applyReactStyle as x } from "./index.es209.js";
|
|
5
5
|
import { MapContext as O } from "./index.es16.js";
|
|
6
|
-
import { arePointsEqual as S } from "./index.
|
|
7
|
-
import { compareClassNames as q } from "./index.
|
|
6
|
+
import { arePointsEqual as S } from "./index.es210.js";
|
|
7
|
+
import { compareClassNames as q } from "./index.es211.js";
|
|
8
8
|
A(D((e, E) => {
|
|
9
9
|
const { map: v, mapLib: R } = N(O), r = b({ props: e }), t = y(() => {
|
|
10
10
|
let i = !1;
|
package/dist/index.es18.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createPortal as u } from "react-dom";
|
|
2
2
|
import { memo as d, forwardRef as g, useContext as h, useMemo as i, useRef as L, useEffect as s, useImperativeHandle as C } from "react";
|
|
3
|
-
import { applyReactStyle as x } from "./index.
|
|
3
|
+
import { applyReactStyle as x } from "./index.es209.js";
|
|
4
4
|
import { MapContext as M } from "./index.es16.js";
|
|
5
|
-
import { deepEqual as N } from "./index.
|
|
6
|
-
import { compareClassNames as O } from "./index.
|
|
5
|
+
import { deepEqual as N } from "./index.es210.js";
|
|
6
|
+
import { compareClassNames as O } from "./index.es211.js";
|
|
7
7
|
d(g((e, m) => {
|
|
8
8
|
const { map: l, mapLib: r } = h(M), c = i(() => document.createElement("div"), []), a = L({ props: e }), t = i(() => {
|
|
9
9
|
const n = { ...e }, o = new r.Popup(n);
|
package/dist/index.es19.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { memo as i, useEffect as r } from "react";
|
|
2
|
-
import { applyReactStyle as e } from "./index.
|
|
2
|
+
import { applyReactStyle as e } from "./index.es209.js";
|
|
3
3
|
import { useControl as l } from "./index.es30.js";
|
|
4
4
|
function m(t) {
|
|
5
5
|
const o = l(({ mapLib: n }) => new n.AttributionControl(t), {
|
package/dist/index.es190.js
CHANGED
|
@@ -1,246 +1,151 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
setProps(t) {
|
|
88
|
-
const o = this.props;
|
|
89
|
-
this.props = t;
|
|
90
|
-
const a = this._updateSettings(t, o), e = this._updateSize(t), s = this._updateViewState(t);
|
|
91
|
-
this._updateStyle(t, o), this._updateStyleComponents(t), this._updateHandlers(t, o), (a || e || s && !this._map.isMoving()) && this.redraw();
|
|
92
|
-
}
|
|
93
|
-
static reuse(t, o) {
|
|
94
|
-
const a = c.savedMaps.pop();
|
|
95
|
-
if (!a)
|
|
96
|
-
return null;
|
|
97
|
-
const e = a.map, s = e.getContainer();
|
|
98
|
-
for (o.className = s.className; s.childNodes.length > 0; )
|
|
99
|
-
o.appendChild(s.childNodes[0]);
|
|
100
|
-
e._container = o;
|
|
101
|
-
const n = e._resizeObserver;
|
|
102
|
-
n && (n.disconnect(), n.observe(o)), a.setProps({ ...t, styleDiffing: !1 }), e.resize();
|
|
103
|
-
const { initialViewState: r } = t;
|
|
104
|
-
return r && (r.bounds ? e.fitBounds(r.bounds, { ...r.fitBoundsOptions, duration: 0 }) : a._updateViewState(r)), e.isStyleLoaded() ? e.fire("load") : e.once("style.load", () => e.fire("load")), e._update(), a;
|
|
105
|
-
}
|
|
106
|
-
/* eslint-disable complexity,max-statements */
|
|
107
|
-
_initialize(t) {
|
|
108
|
-
const { props: o } = this, { mapStyle: a = u } = o, e = {
|
|
109
|
-
...o,
|
|
110
|
-
...o.initialViewState,
|
|
111
|
-
container: t,
|
|
112
|
-
style: l(a)
|
|
113
|
-
}, s = e.initialViewState || e.viewState || e;
|
|
114
|
-
if (Object.assign(e, {
|
|
115
|
-
center: [s.longitude || 0, s.latitude || 0],
|
|
116
|
-
zoom: s.zoom || 0,
|
|
117
|
-
pitch: s.pitch || 0,
|
|
118
|
-
bearing: s.bearing || 0
|
|
119
|
-
}), o.gl) {
|
|
120
|
-
const r = HTMLCanvasElement.prototype.getContext;
|
|
121
|
-
HTMLCanvasElement.prototype.getContext = () => (HTMLCanvasElement.prototype.getContext = r, o.gl);
|
|
122
|
-
}
|
|
123
|
-
const n = new this._MapClass(e);
|
|
124
|
-
s.padding && n.setPadding(s.padding), o.cursor && (n.getCanvas().style.cursor = o.cursor), n.transformCameraUpdate = this._onCameraUpdate, n.on("style.load", () => {
|
|
125
|
-
this._styleComponents = {
|
|
126
|
-
light: n.getLight(),
|
|
127
|
-
sky: n.getSky(),
|
|
128
|
-
// @ts-ignore getProjection() does not exist in v4
|
|
129
|
-
projection: n.getProjection?.(),
|
|
130
|
-
terrain: n.getTerrain()
|
|
131
|
-
}, this._updateStyleComponents(this.props);
|
|
132
|
-
}), n.on("sourcedata", () => {
|
|
133
|
-
this._updateStyleComponents(this.props);
|
|
134
|
-
});
|
|
135
|
-
for (const r in h)
|
|
136
|
-
n.on(r, this._onPointerEvent);
|
|
137
|
-
for (const r in m)
|
|
138
|
-
n.on(r, this._onCameraEvent);
|
|
139
|
-
for (const r in f)
|
|
140
|
-
n.on(r, this._onEvent);
|
|
141
|
-
this._map = n;
|
|
142
|
-
}
|
|
143
|
-
/* eslint-enable complexity,max-statements */
|
|
144
|
-
recycle() {
|
|
145
|
-
this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(), c.savedMaps.push(this);
|
|
146
|
-
}
|
|
147
|
-
destroy() {
|
|
148
|
-
this._map.remove();
|
|
149
|
-
}
|
|
150
|
-
// Force redraw the map now. Typically resize() and jumpTo() is reflected in the next
|
|
151
|
-
// render cycle, which is managed by Mapbox's animation loop.
|
|
152
|
-
// This removes the synchronization issue caused by requestAnimationFrame.
|
|
153
|
-
redraw() {
|
|
154
|
-
const t = this._map;
|
|
155
|
-
t.style && (t._frame && (t._frame.cancel(), t._frame = null), t._render());
|
|
156
|
-
}
|
|
157
|
-
/* Trigger map resize if size is controlled
|
|
158
|
-
@param {object} nextProps
|
|
159
|
-
@returns {bool} true if size has changed
|
|
160
|
-
*/
|
|
161
|
-
_updateSize(t) {
|
|
162
|
-
const { viewState: o } = t;
|
|
163
|
-
if (o) {
|
|
164
|
-
const a = this._map;
|
|
165
|
-
if (o.width !== a.transform.width || o.height !== a.transform.height)
|
|
166
|
-
return a.resize(), !0;
|
|
167
|
-
}
|
|
168
|
-
return !1;
|
|
169
|
-
}
|
|
170
|
-
// Adapted from map.jumpTo
|
|
171
|
-
/* Update camera to match props
|
|
172
|
-
@param {object} nextProps
|
|
173
|
-
@param {bool} triggerEvents - should fire camera events
|
|
174
|
-
@returns {bool} true if anything is changed
|
|
175
|
-
*/
|
|
176
|
-
_updateViewState(t) {
|
|
177
|
-
const o = this._map, a = o.transform;
|
|
178
|
-
if (!o.isMoving()) {
|
|
179
|
-
const s = p(a, t);
|
|
180
|
-
if (Object.keys(s).length > 0)
|
|
181
|
-
return this._internalUpdate = !0, o.jumpTo(s), this._internalUpdate = !1, !0;
|
|
1
|
+
function b(e, o, f) {
|
|
2
|
+
if (e !== null)
|
|
3
|
+
for (var r, i, a, u, c, t, s, y = 0, l = 0, h, p = e.type, C = p === "FeatureCollection", G = p === "Feature", w = C ? e.features.length : 1, P = 0; P < w; P++) {
|
|
4
|
+
s = C ? e.features[P].geometry : G ? e.geometry : e, h = s ? s.type === "GeometryCollection" : !1, c = h ? s.geometries.length : 1;
|
|
5
|
+
for (var M = 0; M < c; M++) {
|
|
6
|
+
var n = 0, g = 0;
|
|
7
|
+
if (u = h ? s.geometries[M] : s, u !== null) {
|
|
8
|
+
t = u.coordinates;
|
|
9
|
+
var v = u.type;
|
|
10
|
+
switch (y = 0, v) {
|
|
11
|
+
case null:
|
|
12
|
+
break;
|
|
13
|
+
case "Point":
|
|
14
|
+
if (o(
|
|
15
|
+
t,
|
|
16
|
+
l,
|
|
17
|
+
P,
|
|
18
|
+
n,
|
|
19
|
+
g
|
|
20
|
+
) === !1)
|
|
21
|
+
return !1;
|
|
22
|
+
l++, n++;
|
|
23
|
+
break;
|
|
24
|
+
case "LineString":
|
|
25
|
+
case "MultiPoint":
|
|
26
|
+
for (r = 0; r < t.length; r++) {
|
|
27
|
+
if (o(
|
|
28
|
+
t[r],
|
|
29
|
+
l,
|
|
30
|
+
P,
|
|
31
|
+
n,
|
|
32
|
+
g
|
|
33
|
+
) === !1)
|
|
34
|
+
return !1;
|
|
35
|
+
l++, v === "MultiPoint" && n++;
|
|
36
|
+
}
|
|
37
|
+
v === "LineString" && n++;
|
|
38
|
+
break;
|
|
39
|
+
case "Polygon":
|
|
40
|
+
case "MultiLineString":
|
|
41
|
+
for (r = 0; r < t.length; r++) {
|
|
42
|
+
for (i = 0; i < t[r].length - y; i++) {
|
|
43
|
+
if (o(
|
|
44
|
+
t[r][i],
|
|
45
|
+
l,
|
|
46
|
+
P,
|
|
47
|
+
n,
|
|
48
|
+
g
|
|
49
|
+
) === !1)
|
|
50
|
+
return !1;
|
|
51
|
+
l++;
|
|
52
|
+
}
|
|
53
|
+
v === "MultiLineString" && n++, v === "Polygon" && g++;
|
|
54
|
+
}
|
|
55
|
+
v === "Polygon" && n++;
|
|
56
|
+
break;
|
|
57
|
+
case "MultiPolygon":
|
|
58
|
+
for (r = 0; r < t.length; r++) {
|
|
59
|
+
for (g = 0, i = 0; i < t[r].length; i++) {
|
|
60
|
+
for (a = 0; a < t[r][i].length - y; a++) {
|
|
61
|
+
if (o(
|
|
62
|
+
t[r][i][a],
|
|
63
|
+
l,
|
|
64
|
+
P,
|
|
65
|
+
n,
|
|
66
|
+
g
|
|
67
|
+
) === !1)
|
|
68
|
+
return !1;
|
|
69
|
+
l++;
|
|
70
|
+
}
|
|
71
|
+
g++;
|
|
72
|
+
}
|
|
73
|
+
n++;
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
case "GeometryCollection":
|
|
77
|
+
for (r = 0; r < u.geometries.length; r++)
|
|
78
|
+
if (b(u.geometries[r], o) === !1)
|
|
79
|
+
return !1;
|
|
80
|
+
break;
|
|
81
|
+
default:
|
|
82
|
+
throw new Error("Unknown Geometry Type");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
182
86
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
87
|
+
}
|
|
88
|
+
function S(e, o) {
|
|
89
|
+
if (e.type === "Feature")
|
|
90
|
+
o(e, 0);
|
|
91
|
+
else if (e.type === "FeatureCollection")
|
|
92
|
+
for (var f = 0; f < e.features.length && o(e.features[f], f) !== !1; f++)
|
|
93
|
+
;
|
|
94
|
+
}
|
|
95
|
+
function k(e, o) {
|
|
96
|
+
var f, r, i, a, u, c, t, s, y, l, h = 0, p = e.type === "FeatureCollection", C = e.type === "Feature", G = p ? e.features.length : 1;
|
|
97
|
+
for (f = 0; f < G; f++) {
|
|
98
|
+
for (c = p ? e.features[f].geometry : C ? e.geometry : e, s = p ? e.features[f].properties : C ? e.properties : {}, y = p ? e.features[f].bbox : C ? e.bbox : void 0, l = p ? e.features[f].id : C ? e.id : void 0, t = c ? c.type === "GeometryCollection" : !1, u = t ? c.geometries.length : 1, i = 0; i < u; i++) {
|
|
99
|
+
if (a = t ? c.geometries[i] : c, a === null) {
|
|
100
|
+
if (o(
|
|
101
|
+
null,
|
|
102
|
+
h,
|
|
103
|
+
s,
|
|
104
|
+
y,
|
|
105
|
+
l
|
|
106
|
+
) === !1)
|
|
107
|
+
return !1;
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
switch (a.type) {
|
|
111
|
+
case "Point":
|
|
112
|
+
case "LineString":
|
|
113
|
+
case "MultiPoint":
|
|
114
|
+
case "Polygon":
|
|
115
|
+
case "MultiLineString":
|
|
116
|
+
case "MultiPolygon": {
|
|
117
|
+
if (o(
|
|
118
|
+
a,
|
|
119
|
+
h,
|
|
120
|
+
s,
|
|
121
|
+
y,
|
|
122
|
+
l
|
|
123
|
+
) === !1)
|
|
124
|
+
return !1;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
case "GeometryCollection": {
|
|
128
|
+
for (r = 0; r < a.geometries.length; r++)
|
|
129
|
+
if (o(
|
|
130
|
+
a.geometries[r],
|
|
131
|
+
h,
|
|
132
|
+
s,
|
|
133
|
+
y,
|
|
134
|
+
l
|
|
135
|
+
) === !1)
|
|
136
|
+
return !1;
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
default:
|
|
140
|
+
throw new Error("Unknown Geometry Type");
|
|
141
|
+
}
|
|
231
142
|
}
|
|
232
|
-
|
|
233
|
-
_updateHover(t) {
|
|
234
|
-
const { props: o } = this;
|
|
235
|
-
if (o.interactiveLayerIds && (o.onMouseMove || o.onMouseEnter || o.onMouseLeave)) {
|
|
236
|
-
const e = t.type, s = this._hoveredFeatures?.length > 0, n = this._queryRenderedFeatures(t.point), r = n.length > 0;
|
|
237
|
-
!r && s && (t.type = "mouseleave", this._onPointerEvent(t)), this._hoveredFeatures = n, r && !s && (t.type = "mouseenter", this._onPointerEvent(t)), t.type = e;
|
|
238
|
-
} else
|
|
239
|
-
this._hoveredFeatures = null;
|
|
143
|
+
h++;
|
|
240
144
|
}
|
|
241
145
|
}
|
|
242
|
-
c.savedMaps = [];
|
|
243
146
|
export {
|
|
244
|
-
|
|
147
|
+
b as coordEach,
|
|
148
|
+
S as featureEach,
|
|
149
|
+
k as geomEach
|
|
245
150
|
};
|
|
246
151
|
//# sourceMappingURL=index.es190.js.map
|