@performant-software/geospatial 2.1.0-beta.2 → 2.1.0-beta.3
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/build/index.js +2 -0
- package/build/index.js.map +1 -0
- package/build/main.css +127 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs104.js +1 -1
- package/dist/index.cjs105.js +1 -1
- package/dist/index.cjs106.js +1 -1
- package/dist/index.cjs107.js +1 -1
- package/dist/index.cjs110.js +1 -1
- package/dist/index.cjs111.js +1 -1
- package/dist/index.cjs112.js +1 -1
- package/dist/index.cjs116.js +1 -1
- package/dist/index.cjs119.js +1 -1
- package/dist/index.cjs123.js +1 -1
- package/dist/index.cjs126.js +1 -1
- package/dist/index.cjs134.js +1 -1
- package/dist/index.cjs135.js +1 -1
- package/dist/index.cjs136.js +1 -1
- package/dist/index.cjs137.js +1 -1
- package/dist/index.cjs138.js +1 -1
- package/dist/index.cjs139.js +1 -1
- package/dist/index.cjs140.js +1 -1
- package/dist/index.cjs142.js +1 -1
- package/dist/index.cjs143.js +1 -1
- package/dist/index.cjs144.js +1 -1
- package/dist/index.cjs145.js +1 -1
- package/dist/index.cjs146.js +1 -1
- package/dist/index.cjs147.js +1 -1
- package/dist/index.cjs148.js +1 -1
- package/dist/index.cjs149.js +1 -1
- package/dist/index.cjs150.js +1 -1
- package/dist/index.cjs153.js +1 -1
- package/dist/index.cjs154.js +1 -1
- package/dist/index.cjs156.js +1 -1
- package/dist/index.cjs157.js +1 -1
- package/dist/index.cjs158.js +1 -1
- package/dist/index.cjs159.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs160.js +1 -1
- package/dist/index.cjs161.js +1 -1
- package/dist/index.cjs162.js +1 -1
- package/dist/index.cjs163.js +1 -1
- package/dist/index.cjs169.js +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs170.js +1 -1
- package/dist/index.cjs171.js +1 -1
- package/dist/index.cjs172.js +1 -1
- package/dist/index.cjs173.js +1 -1
- package/dist/index.cjs18.js +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.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.cjs213.js +1 -1
- package/dist/index.cjs213.js.map +1 -1
- package/dist/index.cjs214.js +1 -1
- package/dist/index.cjs214.js.map +1 -1
- package/dist/index.cjs215.js +1 -1
- package/dist/index.cjs215.js.map +1 -1
- package/dist/index.cjs216.js +1 -1
- package/dist/index.cjs216.js.map +1 -1
- package/dist/index.cjs217.js +1 -1
- package/dist/index.cjs217.js.map +1 -1
- package/dist/index.cjs218.js +1 -1
- package/dist/index.cjs218.js.map +1 -1
- package/dist/index.cjs219.js +1 -1
- package/dist/index.cjs219.js.map +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs220.js +1 -1
- package/dist/index.cjs220.js.map +1 -1
- package/dist/index.cjs221.js +1 -1
- package/dist/index.cjs221.js.map +1 -1
- package/dist/index.cjs222.js +1 -1
- package/dist/index.cjs222.js.map +1 -1
- package/dist/index.cjs223.js +1 -1
- package/dist/index.cjs223.js.map +1 -1
- package/dist/index.cjs224.js +1 -1
- package/dist/index.cjs224.js.map +1 -1
- package/dist/index.cjs225.js +1 -1
- package/dist/index.cjs225.js.map +1 -1
- package/dist/index.cjs226.js +1 -1
- package/dist/index.cjs226.js.map +1 -1
- package/dist/index.cjs227.js +1 -1
- package/dist/index.cjs227.js.map +1 -1
- package/dist/index.cjs228.js +1 -1
- package/dist/index.cjs228.js.map +1 -1
- package/dist/index.cjs229.js +1 -1
- package/dist/index.cjs229.js.map +1 -1
- package/dist/index.cjs230.js +1 -1
- package/dist/index.cjs230.js.map +1 -1
- package/dist/index.cjs238.js +1 -1
- package/dist/index.cjs24.js +1 -1
- package/dist/index.cjs243.js +1 -1
- package/dist/index.cjs246.js +1 -1
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs250.js +1 -1
- package/dist/index.cjs250.js.map +1 -1
- package/dist/index.cjs251.js +1 -1
- package/dist/index.cjs251.js.map +1 -1
- package/dist/index.cjs26.js +1 -1
- package/dist/index.cjs28.js +1 -1
- package/dist/index.cjs29.js +1 -1
- package/dist/index.cjs30.js +1 -1
- package/dist/index.cjs34.js +1 -1
- package/dist/index.cjs35.js +1 -1
- package/dist/index.cjs36.js +1 -1
- package/dist/index.cjs38.js +1 -1
- package/dist/index.cjs39.js +1 -1
- package/dist/index.cjs41.js +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs62.js +1 -1
- package/dist/index.cjs63.js +1 -1
- package/dist/index.cjs64.js +1 -1
- package/dist/index.cjs65.js +1 -1
- package/dist/index.cjs66.js +1 -1
- package/dist/index.cjs67.js +1 -1
- package/dist/index.cjs68.js +1 -1
- package/dist/index.cjs69.js +1 -1
- package/dist/index.cjs70.js +1 -1
- package/dist/index.cjs71.js +1 -1
- package/dist/index.cjs72.js +1 -1
- package/dist/index.cjs75.js +1 -1
- package/dist/index.cjs82.js +1 -1
- package/dist/index.cjs83.js +1 -1
- package/dist/index.cjs84.js +1 -1
- package/dist/index.cjs85.js +1 -1
- package/dist/index.cjs86.js +1 -1
- package/dist/index.cjs87.js +1 -1
- package/dist/index.cjs88.js +1 -1
- package/dist/index.cjs89.js +1 -1
- package/dist/index.cjs90.js +1 -1
- package/dist/index.cjs93.js +1 -1
- package/dist/index.cjs94.js +1 -1
- package/dist/index.cjs96.js +1 -1
- package/dist/index.cjs97.js +1 -1
- package/dist/index.cjs98.js +1 -1
- package/dist/index.cjs99.js +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es104.js +1 -1
- package/dist/index.es105.js +1 -1
- package/dist/index.es106.js +1 -1
- package/dist/index.es107.js +1 -1
- package/dist/index.es110.js +2 -2
- package/dist/index.es111.js +2 -2
- package/dist/index.es112.js +1 -1
- package/dist/index.es116.js +2 -2
- package/dist/index.es119.js +1 -1
- package/dist/index.es123.js +1 -1
- package/dist/index.es126.js +1 -1
- package/dist/index.es134.js +1 -1
- package/dist/index.es135.js +1 -1
- package/dist/index.es136.js +1 -1
- package/dist/index.es137.js +2 -2
- package/dist/index.es138.js +1 -1
- package/dist/index.es139.js +1 -1
- package/dist/index.es140.js +1 -1
- package/dist/index.es142.js +2 -2
- package/dist/index.es143.js +2 -2
- package/dist/index.es144.js +1 -1
- package/dist/index.es145.js +1 -1
- package/dist/index.es146.js +1 -1
- package/dist/index.es147.js +1 -1
- package/dist/index.es148.js +2 -2
- package/dist/index.es149.js +2 -2
- package/dist/index.es150.js +1 -1
- package/dist/index.es153.js +2 -2
- package/dist/index.es154.js +2 -2
- package/dist/index.es156.js +2 -2
- package/dist/index.es157.js +1 -1
- package/dist/index.es158.js +2 -2
- package/dist/index.es159.js +1 -1
- package/dist/index.es16.js +1 -1
- package/dist/index.es160.js +2 -2
- package/dist/index.es161.js +1 -1
- package/dist/index.es162.js +1 -1
- package/dist/index.es163.js +1 -1
- package/dist/index.es169.js +1 -1
- package/dist/index.es17.js +1 -1
- package/dist/index.es170.js +2 -2
- package/dist/index.es171.js +1 -1
- package/dist/index.es172.js +1 -1
- package/dist/index.es173.js +1 -1
- package/dist/index.es18.js +2 -2
- package/dist/index.es191.js +320 -7
- package/dist/index.es191.js.map +1 -1
- package/dist/index.es192.js +74 -4
- package/dist/index.es192.js.map +1 -1
- package/dist/index.es193.js +3 -4
- package/dist/index.es193.js.map +1 -1
- package/dist/index.es194.js +16 -3
- package/dist/index.es194.js.map +1 -1
- package/dist/index.es195.js +11 -3
- package/dist/index.es195.js.map +1 -1
- package/dist/index.es196.js +30 -8
- package/dist/index.es196.js.map +1 -1
- package/dist/index.es197.js +4 -21
- package/dist/index.es197.js.map +1 -1
- package/dist/index.es198.js +2 -22
- package/dist/index.es198.js.map +1 -1
- package/dist/index.es199.js +6 -12
- package/dist/index.es199.js.map +1 -1
- package/dist/index.es20.js +2 -2
- package/dist/index.es200.js +4 -16
- package/dist/index.es200.js.map +1 -1
- package/dist/index.es201.js +4 -6
- package/dist/index.es201.js.map +1 -1
- package/dist/index.es202.js +3 -9
- package/dist/index.es202.js.map +1 -1
- package/dist/index.es203.js +3 -7
- package/dist/index.es203.js.map +1 -1
- package/dist/index.es204.js +8 -21
- package/dist/index.es204.js.map +1 -1
- package/dist/index.es205.js +20 -8
- package/dist/index.es205.js.map +1 -1
- package/dist/index.es206.js +22 -9
- package/dist/index.es206.js.map +1 -1
- package/dist/index.es207.js +14 -4
- package/dist/index.es207.js.map +1 -1
- package/dist/index.es208.js +16 -10
- package/dist/index.es208.js.map +1 -1
- package/dist/index.es209.js +5 -8
- package/dist/index.es209.js.map +1 -1
- package/dist/index.es21.js +2 -2
- package/dist/index.es210.js +7 -21
- package/dist/index.es210.js.map +1 -1
- package/dist/index.es211.js +6 -11
- package/dist/index.es211.js.map +1 -1
- package/dist/index.es212.js +20 -17
- package/dist/index.es212.js.map +1 -1
- package/dist/index.es213.js +10 -4
- package/dist/index.es213.js.map +1 -1
- package/dist/index.es214.js +9 -18
- package/dist/index.es214.js.map +1 -1
- package/dist/index.es215.js +4 -12
- package/dist/index.es215.js.map +1 -1
- package/dist/index.es216.js +10 -3
- package/dist/index.es216.js.map +1 -1
- package/dist/index.es217.js +8 -4
- package/dist/index.es217.js.map +1 -1
- package/dist/index.es218.js +22 -320
- package/dist/index.es218.js.map +1 -1
- package/dist/index.es219.js +10 -73
- package/dist/index.es219.js.map +1 -1
- package/dist/index.es22.js +2 -2
- package/dist/index.es220.js +19 -3
- package/dist/index.es220.js.map +1 -1
- package/dist/index.es221.js +4 -16
- package/dist/index.es221.js.map +1 -1
- package/dist/index.es222.js +17 -10
- package/dist/index.es222.js.map +1 -1
- package/dist/index.es223.js +11 -30
- package/dist/index.es223.js.map +1 -1
- package/dist/index.es224.js +3 -4
- package/dist/index.es224.js.map +1 -1
- package/dist/index.es225.js +5 -2
- package/dist/index.es225.js.map +1 -1
- package/dist/index.es226.js +46 -3
- package/dist/index.es226.js.map +1 -1
- package/dist/index.es227.js +22 -5
- package/dist/index.es227.js.map +1 -1
- package/dist/index.es228.js +3 -8
- package/dist/index.es228.js.map +1 -1
- package/dist/index.es229.js +6 -44
- package/dist/index.es229.js.map +1 -1
- package/dist/index.es230.js +5 -22
- package/dist/index.es230.js.map +1 -1
- package/dist/index.es238.js +1 -1
- package/dist/index.es24.js +1 -1
- package/dist/index.es243.js +1 -1
- package/dist/index.es246.js +1 -1
- package/dist/index.es25.js +2 -2
- package/dist/index.es250.js +15 -4
- package/dist/index.es250.js.map +1 -1
- package/dist/index.es251.js +4 -15
- package/dist/index.es251.js.map +1 -1
- package/dist/index.es26.js +2 -2
- package/dist/index.es28.js +1 -1
- package/dist/index.es29.js +1 -1
- package/dist/index.es30.js +1 -1
- package/dist/index.es34.js +2 -2
- package/dist/index.es35.js +3 -3
- package/dist/index.es36.js +1 -1
- package/dist/index.es38.js +1 -1
- package/dist/index.es39.js +1 -1
- package/dist/index.es41.js +1 -1
- package/dist/index.es5.js +14 -16
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es62.js +1 -1
- package/dist/index.es63.js +4 -4
- package/dist/index.es64.js +2 -2
- package/dist/index.es65.js +2 -2
- package/dist/index.es66.js +1 -1
- package/dist/index.es67.js +1 -1
- package/dist/index.es68.js +1 -1
- package/dist/index.es69.js +1 -1
- package/dist/index.es70.js +1 -1
- package/dist/index.es71.js +2 -2
- package/dist/index.es72.js +2 -2
- package/dist/index.es75.js +1 -1
- package/dist/index.es82.js +1 -1
- package/dist/index.es83.js +1 -1
- package/dist/index.es84.js +1 -1
- package/dist/index.es85.js +1 -1
- package/dist/index.es86.js +1 -1
- package/dist/index.es87.js +1 -1
- package/dist/index.es88.js +1 -1
- package/dist/index.es89.js +1 -1
- package/dist/index.es90.js +1 -1
- package/dist/index.es93.js +1 -1
- package/dist/index.es94.js +1 -1
- package/dist/index.es96.js +3 -3
- package/dist/index.es97.js +1 -1
- package/dist/index.es98.js +2 -2
- package/dist/index.es99.js +1 -1
- package/package.json +1 -1
- package/src/components/{LocationMarker.js → LocationMarkers.js} +13 -8
- package/src/index.js +1 -1
- package/types/components/LocationMarker.js.flow +10 -5
- package/types/components/LocationMarkers.js.flow +82 -0
- package/types/index.js.flow +1 -1
package/dist/index.es5.js
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
import { j as e } from "./index.es13.js";
|
|
2
|
-
import { useMap as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { DEFAULT_FILL_STYLE as
|
|
2
|
+
import { useMap as o, PulsingMarkerLayer as f, MixedGeoJSONLayer as l } from "@peripleo/maplibre";
|
|
3
|
+
import { useEffect as n } from "react";
|
|
4
|
+
import { DEFAULT_FILL_STYLE as r, DEFAULT_POINT_STYLE as d, DEFAULT_STROKE_STYLE as m } from "./index.es45.js";
|
|
5
5
|
import S from "./index.es9.js";
|
|
6
|
-
const
|
|
7
|
-
const a =
|
|
8
|
-
return
|
|
6
|
+
const u = 2, s = (t) => {
|
|
7
|
+
const a = o();
|
|
8
|
+
return n(() => {
|
|
9
9
|
if (a && t.data) {
|
|
10
|
-
const
|
|
11
|
-
a.fitBounds(
|
|
10
|
+
const i = S.getBoundingBox(t.data, t.buffer);
|
|
11
|
+
a.fitBounds(i);
|
|
12
12
|
}
|
|
13
13
|
}, [a, t.buffer, t.data]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
14
|
-
/* @__PURE__ */ e.jsx(
|
|
15
|
-
|
|
14
|
+
t.animate && /* @__PURE__ */ e.jsx(
|
|
15
|
+
f,
|
|
16
16
|
{
|
|
17
|
-
id: "current",
|
|
18
17
|
data: t.data
|
|
19
18
|
}
|
|
20
19
|
),
|
|
21
20
|
/* @__PURE__ */ e.jsx(
|
|
22
|
-
|
|
21
|
+
l,
|
|
23
22
|
{
|
|
24
|
-
id: "current",
|
|
25
23
|
data: t.data,
|
|
26
24
|
fillStyle: t.fillStyle,
|
|
27
25
|
strokeStyle: t.strokeStyle,
|
|
@@ -31,10 +29,10 @@ const m = 2, s = (t) => {
|
|
|
31
29
|
] });
|
|
32
30
|
};
|
|
33
31
|
s.defaultProps = {
|
|
34
|
-
buffer:
|
|
35
|
-
fillStyle:
|
|
32
|
+
buffer: u,
|
|
33
|
+
fillStyle: r,
|
|
36
34
|
pointStyle: d,
|
|
37
|
-
strokeStyle:
|
|
35
|
+
strokeStyle: m
|
|
38
36
|
};
|
|
39
37
|
export {
|
|
40
38
|
s as default
|
package/dist/index.es5.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es5.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index.es5.js","sources":["../src/components/LocationMarkers.js"],"sourcesContent":["// @flow\n\nimport { MixedGeoJSONLayer, PulsingMarkerLayer, useMap } from '@peripleo/maplibre';\nimport React, { useEffect } from 'react';\nimport { DEFAULT_FILL_STYLE, DEFAULT_POINT_STYLE, DEFAULT_STROKE_STYLE } from '../utils/MapStyles';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n /**\n * If `true`, the point marker will display with a pulsing animation.\n */\n animate?: boolean,\n\n /**\n * The number of miles to buffer the GeoJSON data.\n */\n buffer: number,\n\n /**\n * The GeoJSON data representing the location.\n */\n data: { [key: string]: any },\n\n /**\n * GeoJSON layer fill style.\n */\n fillStyle?: { [key: string]: any },\n\n /**\n * GeoJSON layer point style.\n */\n pointStyle?: { [key: string]: any },\n\n /**\n * GeoJSON layer stroke style\n */\n strokeStyle?: { [key: string]: any }\n};\n\nconst DEFAULT_BUFFER = 2;\n\n/**\n * This component renders a location marker to be used in a Peripleo context.\n */\nconst LocationMarkers = (props: Props) => {\n const map = useMap();\n\n /**\n * Sets the bounding box on the map.\n */\n useEffect(() => {\n if (map && props.data) {\n const boundingBox = MapUtils.getBoundingBox(props.data, props.buffer);\n map.fitBounds(boundingBox);\n }\n }, [map, props.buffer, props.data]);\n\n return (\n <>\n { props.animate && (\n <PulsingMarkerLayer\n data={props.data}\n />\n )}\n <MixedGeoJSONLayer\n data={props.data}\n fillStyle={props.fillStyle}\n strokeStyle={props.strokeStyle}\n pointStyle={props.pointStyle}\n />\n </>\n );\n};\n\nLocationMarkers.defaultProps = {\n buffer: DEFAULT_BUFFER,\n fillStyle: DEFAULT_FILL_STYLE,\n pointStyle: DEFAULT_POINT_STYLE,\n strokeStyle: DEFAULT_STROKE_STYLE\n};\n\nexport default LocationMarkers;\n"],"names":["DEFAULT_BUFFER","LocationMarkers","props","map","useMap","useEffect","boundingBox","MapUtils","jsxs","Fragment","jsx","PulsingMarkerLayer","MixedGeoJSONLayer","DEFAULT_FILL_STYLE","DEFAULT_POINT_STYLE","DEFAULT_STROKE_STYLE"],"mappings":";;;;;AAuCA,MAAMA,IAAiB,GAKjBC,IAAkB,CAACC,MAAiB;AACxC,QAAMC,IAAMC;AAKZ,SAAAC,EAAU,MAAM;AACV,QAAAF,KAAOD,EAAM,MAAM;AACrB,YAAMI,IAAcC,EAAS,eAAeL,EAAM,MAAMA,EAAM,MAAM;AACpE,MAAAC,EAAI,UAAUG,CAAW;AAAA,IAC3B;AAAA,EAAA,GACC,CAACH,GAAKD,EAAM,QAAQA,EAAM,IAAI,CAAC,GAI5BM,gBAAAA,EAAA,KAAAC,YAAA,EAAA,UAAA;AAAA,IAAAP,EAAM,WACNQ,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAMT,EAAM;AAAA,MAAA;AAAA,IACd;AAAA,IAEFQ,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAMV,EAAM;AAAA,QACZ,WAAWA,EAAM;AAAA,QACjB,aAAaA,EAAM;AAAA,QACnB,YAAYA,EAAM;AAAA,MAAA;AAAA,IACpB;AAAA,EACF,EAAA,CAAA;AAEJ;AAEAD,EAAgB,eAAe;AAAA,EAC7B,QAAQD;AAAA,EACR,WAAWa;AAAA,EACX,YAAYC;AAAA,EACZ,aAAaC;AACf;"}
|
package/dist/index.es62.js
CHANGED
package/dist/index.es63.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as l from "react";
|
|
2
2
|
import { useContext as b, useState as E, useRef as c, useEffect as x, useImperativeHandle as w, useMemo as y } from "react";
|
|
3
3
|
import { MountedMapsContext as L } from "./index.es73.js";
|
|
4
|
-
import m from "./index.
|
|
5
|
-
import I from "./index.
|
|
6
|
-
import C from "./index.
|
|
7
|
-
import g from "./index.
|
|
4
|
+
import m from "./index.es191.js";
|
|
5
|
+
import I from "./index.es192.js";
|
|
6
|
+
import C from "./index.es193.js";
|
|
7
|
+
import g from "./index.es194.js";
|
|
8
8
|
const R = l.createContext(null);
|
|
9
9
|
function A(e, f, d) {
|
|
10
10
|
const o = b(L), [i, p] = E(null), s = c(), { current: a } = c({ mapLib: null, map: null });
|
package/dist/index.es64.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as k from "react";
|
|
2
2
|
import { memo as A, forwardRef as P, useContext as C, useRef as D, useMemo as M, useEffect as h, useImperativeHandle as y } 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.es195.js";
|
|
5
5
|
import { MapContext as O } from "./index.es63.js";
|
|
6
|
-
import { arePointsEqual as S } from "./index.
|
|
6
|
+
import { arePointsEqual as S } from "./index.es196.js";
|
|
7
7
|
function q(o, E) {
|
|
8
8
|
const { map: R, mapLib: b } = C(O), i = D({ props: o });
|
|
9
9
|
i.current.props = o;
|
package/dist/index.es65.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createPortal as h } from "react-dom";
|
|
2
2
|
import { memo as L, forwardRef as v, useContext as C, useMemo as f, useRef as x, useEffect as m, useImperativeHandle as N } from "react";
|
|
3
|
-
import { applyReactStyle as M } from "./index.
|
|
3
|
+
import { applyReactStyle as M } from "./index.es195.js";
|
|
4
4
|
import { MapContext as O } from "./index.es63.js";
|
|
5
|
-
import { deepEqual as y } from "./index.
|
|
5
|
+
import { deepEqual as y } from "./index.es196.js";
|
|
6
6
|
function r(t) {
|
|
7
7
|
return new Set(t ? t.trim().split(/\s+/) : []);
|
|
8
8
|
}
|
package/dist/index.es66.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.es195.js";
|
|
3
3
|
import l from "./index.es12.js";
|
|
4
4
|
function m(t) {
|
|
5
5
|
const o = l(({ mapLib: n }) => new n.AttributionControl(t), {
|
package/dist/index.es67.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { memo as o, useEffect as l } from "react";
|
|
2
|
-
import { applyReactStyle as r } from "./index.
|
|
2
|
+
import { applyReactStyle as r } from "./index.es195.js";
|
|
3
3
|
import c from "./index.es12.js";
|
|
4
4
|
function i(t) {
|
|
5
5
|
const n = c(({ mapLib: e }) => new e.FullscreenControl({
|
package/dist/index.es68.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { memo as s, forwardRef as d, useRef as v, useImperativeHandle as _, useEffect as f } from "react";
|
|
2
|
-
import { applyReactStyle as p } from "./index.
|
|
2
|
+
import { applyReactStyle as p } from "./index.es195.js";
|
|
3
3
|
import m from "./index.es12.js";
|
|
4
4
|
function b(e, c) {
|
|
5
5
|
const a = v({ props: e }), l = m(({ mapLib: i }) => {
|
package/dist/index.es69.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { memo as i, useEffect as e } from "react";
|
|
2
|
-
import { applyReactStyle as l } from "./index.
|
|
2
|
+
import { applyReactStyle as l } from "./index.es195.js";
|
|
3
3
|
import r from "./index.es12.js";
|
|
4
4
|
function m(t) {
|
|
5
5
|
const o = r(({ mapLib: n }) => new n.NavigationControl(t), {
|
package/dist/index.es70.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { memo as m, useRef as u, useEffect as l } from "react";
|
|
2
|
-
import { applyReactStyle as a } from "./index.
|
|
2
|
+
import { applyReactStyle as a } from "./index.es195.js";
|
|
3
3
|
import f from "./index.es12.js";
|
|
4
4
|
function r(t) {
|
|
5
5
|
const i = f(({ mapLib: c }) => new c.ScaleControl(t), {
|
package/dist/index.es71.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useContext as m, useRef as L, useState as g, useMemo as x, useEffect as h } from "react";
|
|
2
2
|
import { MapContext as b } from "./index.es63.js";
|
|
3
|
-
import d from "./index.
|
|
4
|
-
import { deepEqual as l } from "./index.
|
|
3
|
+
import d from "./index.es197.js";
|
|
4
|
+
import { deepEqual as l } from "./index.es196.js";
|
|
5
5
|
function k(t, e, a, o) {
|
|
6
6
|
if (d(a.id === o.id, "layer id changed"), d(a.type === o.type, "layer type changed"), a.type === "custom" || o.type === "custom")
|
|
7
7
|
return;
|
package/dist/index.es72.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as u from "react";
|
|
2
2
|
import { useContext as f, useRef as y, useState as m, useMemo as g, useEffect as S, cloneElement as h } from "react";
|
|
3
3
|
import { MapContext as C } from "./index.es63.js";
|
|
4
|
-
import s from "./index.
|
|
5
|
-
import { deepEqual as v } from "./index.
|
|
4
|
+
import s from "./index.es197.js";
|
|
5
|
+
import { deepEqual as v } from "./index.es196.js";
|
|
6
6
|
let x = 0;
|
|
7
7
|
function U(t, e, a) {
|
|
8
8
|
if (t.style && t.style._loaded) {
|
package/dist/index.es75.js
CHANGED
|
@@ -2,7 +2,7 @@ import r from "./index.es19.js";
|
|
|
2
2
|
import n from "./index.es142.js";
|
|
3
3
|
import f from "./index.es103.js";
|
|
4
4
|
import { push as u } from "./index.es15.js";
|
|
5
|
-
import m from "./index.
|
|
5
|
+
import m from "./index.es225.js";
|
|
6
6
|
function l(o) {
|
|
7
7
|
return n(f(o), function(t) {
|
|
8
8
|
var i = r[t] = o[t];
|
package/dist/index.es82.js
CHANGED
package/dist/index.es83.js
CHANGED
package/dist/index.es84.js
CHANGED
package/dist/index.es85.js
CHANGED
package/dist/index.es86.js
CHANGED
package/dist/index.es87.js
CHANGED
package/dist/index.es88.js
CHANGED
package/dist/index.es89.js
CHANGED
package/dist/index.es90.js
CHANGED
package/dist/index.es93.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { supportsArrayBuffer as i, nativeIsView as t, toString as a } from "./index.es15.js";
|
|
2
2
|
import e from "./index.es89.js";
|
|
3
3
|
import o from "./index.es114.js";
|
|
4
|
-
import n from "./index.
|
|
4
|
+
import n from "./index.es201.js";
|
|
5
5
|
var s = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
|
|
6
6
|
function f(r) {
|
|
7
7
|
return t ? t(r) && !e(r) : n(r) && s.test(a.call(r));
|
package/dist/index.es94.js
CHANGED
package/dist/index.es96.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import m from "./index.es19.js";
|
|
2
2
|
import { toString as g, SymbolProto as h } from "./index.es15.js";
|
|
3
|
-
import j from "./index.
|
|
3
|
+
import j from "./index.es203.js";
|
|
4
4
|
import D from "./index.es93.js";
|
|
5
5
|
import y from "./index.es16.js";
|
|
6
6
|
import { hasStringTagBug as V } from "./index.es17.js";
|
|
7
7
|
import v from "./index.es89.js";
|
|
8
8
|
import w from "./index.es98.js";
|
|
9
|
-
import q from "./index.
|
|
10
|
-
import d from "./index.
|
|
9
|
+
import q from "./index.es200.js";
|
|
10
|
+
import d from "./index.es204.js";
|
|
11
11
|
var B = "[object DataView]";
|
|
12
12
|
function c(e, r, f, n) {
|
|
13
13
|
if (e === r)
|
package/dist/index.es97.js
CHANGED
package/dist/index.es98.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./index.es77.js";
|
|
2
2
|
import { nativeKeys as f, hasEnumBug as m } from "./index.es15.js";
|
|
3
|
-
import n from "./index.
|
|
4
|
-
import o from "./index.
|
|
3
|
+
import n from "./index.es200.js";
|
|
4
|
+
import o from "./index.es206.js";
|
|
5
5
|
function c(r) {
|
|
6
6
|
if (!e(r))
|
|
7
7
|
return [];
|
package/dist/index.es99.js
CHANGED
package/package.json
CHANGED
|
@@ -6,6 +6,11 @@ import { DEFAULT_FILL_STYLE, DEFAULT_POINT_STYLE, DEFAULT_STROKE_STYLE } from '.
|
|
|
6
6
|
import MapUtils from '../utils/Map';
|
|
7
7
|
|
|
8
8
|
type Props = {
|
|
9
|
+
/**
|
|
10
|
+
* If `true`, the point marker will display with a pulsing animation.
|
|
11
|
+
*/
|
|
12
|
+
animate?: boolean,
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* The number of miles to buffer the GeoJSON data.
|
|
11
16
|
*/
|
|
@@ -37,7 +42,7 @@ const DEFAULT_BUFFER = 2;
|
|
|
37
42
|
/**
|
|
38
43
|
* This component renders a location marker to be used in a Peripleo context.
|
|
39
44
|
*/
|
|
40
|
-
const
|
|
45
|
+
const LocationMarkers = (props: Props) => {
|
|
41
46
|
const map = useMap();
|
|
42
47
|
|
|
43
48
|
/**
|
|
@@ -52,12 +57,12 @@ const LocationMarker = (props: Props) => {
|
|
|
52
57
|
|
|
53
58
|
return (
|
|
54
59
|
<>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
{ props.animate && (
|
|
61
|
+
<PulsingMarkerLayer
|
|
62
|
+
data={props.data}
|
|
63
|
+
/>
|
|
64
|
+
)}
|
|
59
65
|
<MixedGeoJSONLayer
|
|
60
|
-
id='current'
|
|
61
66
|
data={props.data}
|
|
62
67
|
fillStyle={props.fillStyle}
|
|
63
68
|
strokeStyle={props.strokeStyle}
|
|
@@ -67,11 +72,11 @@ const LocationMarker = (props: Props) => {
|
|
|
67
72
|
);
|
|
68
73
|
};
|
|
69
74
|
|
|
70
|
-
|
|
75
|
+
LocationMarkers.defaultProps = {
|
|
71
76
|
buffer: DEFAULT_BUFFER,
|
|
72
77
|
fillStyle: DEFAULT_FILL_STYLE,
|
|
73
78
|
pointStyle: DEFAULT_POINT_STYLE,
|
|
74
79
|
strokeStyle: DEFAULT_STROKE_STYLE
|
|
75
80
|
};
|
|
76
81
|
|
|
77
|
-
export default
|
|
82
|
+
export default LocationMarkers;
|
package/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export { default as DrawControl } from './components/DrawControl';
|
|
5
5
|
export { default as GeoJsonLayer } from './components/GeoJsonLayer';
|
|
6
6
|
export { default as LayerMenu } from './components/LayerMenu';
|
|
7
|
-
export { default as
|
|
7
|
+
export { default as LocationMarkers } from './components/LocationMarkers';
|
|
8
8
|
export { default as MapControl } from './components/MapControl';
|
|
9
9
|
export { default as MapDraw } from './components/MapDraw';
|
|
10
10
|
export { default as RasterLayer } from './components/RasterLayer';
|
|
@@ -6,6 +6,11 @@ import { DEFAULT_FILL_STYLE, DEFAULT_POINT_STYLE, DEFAULT_STROKE_STYLE } from '.
|
|
|
6
6
|
import MapUtils from '../utils/Map';
|
|
7
7
|
|
|
8
8
|
type Props = {
|
|
9
|
+
/**
|
|
10
|
+
* If `true`, the point marker will display with a pulsing animation.
|
|
11
|
+
*/
|
|
12
|
+
animate?: boolean,
|
|
13
|
+
|
|
9
14
|
/**
|
|
10
15
|
* The number of miles to buffer the GeoJSON data.
|
|
11
16
|
*/
|
|
@@ -52,12 +57,12 @@ const LocationMarker = (props: Props) => {
|
|
|
52
57
|
|
|
53
58
|
return (
|
|
54
59
|
<>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
{ props.animate && (
|
|
61
|
+
<PulsingMarkerLayer
|
|
62
|
+
data={props.data}
|
|
63
|
+
/>
|
|
64
|
+
)}
|
|
59
65
|
<MixedGeoJSONLayer
|
|
60
|
-
id='current'
|
|
61
66
|
data={props.data}
|
|
62
67
|
fillStyle={props.fillStyle}
|
|
63
68
|
strokeStyle={props.strokeStyle}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
import { MixedGeoJSONLayer, PulsingMarkerLayer, useMap } from '@peripleo/maplibre';
|
|
4
|
+
import React, { useEffect } from 'react';
|
|
5
|
+
import { DEFAULT_FILL_STYLE, DEFAULT_POINT_STYLE, DEFAULT_STROKE_STYLE } from '../utils/MapStyles';
|
|
6
|
+
import MapUtils from '../utils/Map';
|
|
7
|
+
|
|
8
|
+
type Props = {
|
|
9
|
+
/**
|
|
10
|
+
* If `true`, the point marker will display with a pulsing animation.
|
|
11
|
+
*/
|
|
12
|
+
animate?: boolean,
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The number of miles to buffer the GeoJSON data.
|
|
16
|
+
*/
|
|
17
|
+
buffer: number,
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The GeoJSON data representing the location.
|
|
21
|
+
*/
|
|
22
|
+
data: { [key: string]: any },
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* GeoJSON layer fill style.
|
|
26
|
+
*/
|
|
27
|
+
fillStyle?: { [key: string]: any },
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* GeoJSON layer point style.
|
|
31
|
+
*/
|
|
32
|
+
pointStyle?: { [key: string]: any },
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* GeoJSON layer stroke style
|
|
36
|
+
*/
|
|
37
|
+
strokeStyle?: { [key: string]: any }
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const DEFAULT_BUFFER = 2;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* This component renders a location marker to be used in a Peripleo context.
|
|
44
|
+
*/
|
|
45
|
+
const LocationMarkers = (props: Props) => {
|
|
46
|
+
const map = useMap();
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Sets the bounding box on the map.
|
|
50
|
+
*/
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (map && props.data) {
|
|
53
|
+
const boundingBox = MapUtils.getBoundingBox(props.data, props.buffer);
|
|
54
|
+
map.fitBounds(boundingBox);
|
|
55
|
+
}
|
|
56
|
+
}, [map, props.buffer, props.data]);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<>
|
|
60
|
+
{ props.animate && (
|
|
61
|
+
<PulsingMarkerLayer
|
|
62
|
+
data={props.data}
|
|
63
|
+
/>
|
|
64
|
+
)}
|
|
65
|
+
<MixedGeoJSONLayer
|
|
66
|
+
data={props.data}
|
|
67
|
+
fillStyle={props.fillStyle}
|
|
68
|
+
strokeStyle={props.strokeStyle}
|
|
69
|
+
pointStyle={props.pointStyle}
|
|
70
|
+
/>
|
|
71
|
+
</>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
LocationMarkers.defaultProps = {
|
|
76
|
+
buffer: DEFAULT_BUFFER,
|
|
77
|
+
fillStyle: DEFAULT_FILL_STYLE,
|
|
78
|
+
pointStyle: DEFAULT_POINT_STYLE,
|
|
79
|
+
strokeStyle: DEFAULT_STROKE_STYLE
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default LocationMarkers;
|
package/types/index.js.flow
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export { default as DrawControl } from './components/DrawControl';
|
|
5
5
|
export { default as GeoJsonLayer } from './components/GeoJsonLayer';
|
|
6
6
|
export { default as LayerMenu } from './components/LayerMenu';
|
|
7
|
-
export { default as
|
|
7
|
+
export { default as LocationMarkers } from './components/LocationMarkers';
|
|
8
8
|
export { default as MapControl } from './components/MapControl';
|
|
9
9
|
export { default as MapDraw } from './components/MapDraw';
|
|
10
10
|
export { default as RasterLayer } from './components/RasterLayer';
|