@performant-software/geospatial 2.0.0 → 2.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs193.js +1 -1
- package/dist/index.cjs213.js +1 -1
- package/dist/index.cjs226.js +1 -1
- package/dist/index.cjs226.js.map +1 -1
- package/dist/index.cjs228.js +1 -1
- package/dist/index.cjs228.js.map +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es17.js +1 -1
- package/dist/index.es193.js +1 -1
- package/dist/index.es213.js +1 -1
- package/dist/index.es226.js +3 -8
- package/dist/index.es226.js.map +1 -1
- package/dist/index.es228.js +8 -3
- package/dist/index.es228.js.map +1 -1
- package/dist/index.es5.js +14 -16
- package/dist/index.es5.js.map +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 → LocationMarkers.js.flow} +13 -8
- package/types/index.js.flow +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs2.js"),e=require("./index.cjs3.js"),o=require("./index.cjs4.js"),a=require("./index.cjs5.js"),t=require("./index.cjs6.js"),n=require("./index.cjs7.js"),s=require("./index.cjs8.js"),i=require("./index.cjs9.js");exports.DrawControl=r;exports.GeoJsonLayer=e;exports.LayerMenu=o;exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs2.js"),e=require("./index.cjs3.js"),o=require("./index.cjs4.js"),a=require("./index.cjs5.js"),t=require("./index.cjs6.js"),n=require("./index.cjs7.js"),s=require("./index.cjs8.js"),i=require("./index.cjs9.js");exports.DrawControl=r;exports.GeoJsonLayer=e;exports.LayerMenu=o;exports.LocationMarkers=a;exports.MapControl=t;exports.MapDraw=n;exports.RasterLayer=s;exports.Map=i;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs17.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index.cjs15.js"),e=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index.cjs15.js"),e=require("./index.cjs226.js");var t=a.supportsDataView&&e(new DataView(new ArrayBuffer(8))),r=typeof Map<"u"&&e(new Map);exports.hasStringTagBug=t;exports.isIE11=r;
|
|
2
2
|
//# sourceMappingURL=index.cjs17.js.map
|
package/dist/index.cjs193.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./index.
|
|
1
|
+
"use strict";const e=require("./index.cjs228.js"),t=require("./index.cjs195.js"),r=e(t);module.exports=r;
|
|
2
2
|
//# sourceMappingURL=index.cjs193.js.map
|
package/dist/index.cjs213.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./index.
|
|
1
|
+
"use strict";const e=require("./index.cjs228.js"),r=require("./index.cjs194.js"),t=e(r);module.exports=t;
|
|
2
2
|
//# sourceMappingURL=index.cjs213.js.map
|
package/dist/index.cjs226.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("./index.cjs191.js"),e=t("Object");module.exports=e;
|
|
2
2
|
//# sourceMappingURL=index.cjs226.js.map
|
package/dist/index.cjs226.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs226.js","sources":["../../../node_modules/underscore/modules/
|
|
1
|
+
{"version":3,"file":"index.cjs226.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["tagTester"],"mappings":"kDAEeA,EAAAA,EAAU,QAAQ","x_google_ignoreList":[0]}
|
package/dist/index.cjs228.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const n=require("./index.cjs15.js");function u(r){return function(t){var e=r(t);return typeof e=="number"&&e>=0&&e<=n.MAX_ARRAY_INDEX}}module.exports=u;
|
|
2
2
|
//# sourceMappingURL=index.cjs228.js.map
|
package/dist/index.cjs228.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs228.js","sources":["../../../node_modules/underscore/modules/
|
|
1
|
+
{"version":3,"file":"index.cjs228.js","sources":["../../../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":"iDAGA,SAAwBA,EAAwBC,EAAiB,CAC/D,OAAO,SAASC,EAAY,CACtB,IAAAC,EAAeF,EAAgBC,CAAU,EAC7C,OAAO,OAAOC,GAAgB,UAAYA,GAAgB,GAAKA,GAAgBC,iBAAA,CAEnF","x_google_ignoreList":[0]}
|
package/dist/index.cjs5.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./index.cjs13.js"),
|
|
1
|
+
"use strict";const e=require("./index.cjs13.js"),n=require("@peripleo/maplibre"),u=require("react"),i=require("./index.cjs45.js"),l=require("./index.cjs9.js"),o=2,s=t=>{const a=n.useMap();return u.useEffect(()=>{if(a&&t.data){const r=l.getBoundingBox(t.data,t.buffer);a.fitBounds(r)}},[a,t.buffer,t.data]),e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[t.animate&&e.jsxRuntimeExports.jsx(n.PulsingMarkerLayer,{data:t.data}),e.jsxRuntimeExports.jsx(n.MixedGeoJSONLayer,{data:t.data,fillStyle:t.fillStyle,strokeStyle:t.strokeStyle,pointStyle:t.pointStyle})]})};s.defaultProps={buffer:o,fillStyle:i.DEFAULT_FILL_STYLE,pointStyle:i.DEFAULT_POINT_STYLE,strokeStyle:i.DEFAULT_STROKE_STYLE};module.exports=s;
|
|
2
2
|
//# sourceMappingURL=index.cjs5.js.map
|
package/dist/index.cjs5.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs5.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index.cjs5.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":"+JAuCMA,EAAiB,EAKjBC,EAAmBC,GAAiB,CACxC,MAAMC,EAAMC,EAAAA,SAKZC,OAAAA,EAAAA,UAAU,IAAM,CACV,GAAAF,GAAOD,EAAM,KAAM,CACrB,MAAMI,EAAcC,EAAS,eAAeL,EAAM,KAAMA,EAAM,MAAM,EACpEC,EAAI,UAAUG,CAAW,CAC3B,CAAA,EACC,CAACH,EAAKD,EAAM,OAAQA,EAAM,IAAI,CAAC,EAI5BM,EAAA,kBAAA,KAAAC,6BAAA,CAAA,SAAA,CAAAP,EAAM,SACNQ,EAAA,kBAAA,IAACC,EAAA,mBAAA,CACC,KAAMT,EAAM,IAAA,CACd,EAEFQ,EAAA,kBAAA,IAACE,EAAA,kBAAA,CACC,KAAMV,EAAM,KACZ,UAAWA,EAAM,UACjB,YAAaA,EAAM,YACnB,WAAYA,EAAM,UAAA,CACpB,CACF,CAAA,CAAA,CAEJ,EAEAD,EAAgB,aAAe,CAC7B,OAAQD,EACR,UAAWa,EAAA,mBACX,WAAYC,EAAA,oBACZ,YAAaC,EAAA,oBACf"}
|
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as o } from "./index.es2.js";
|
|
2
2
|
import { default as t } from "./index.es3.js";
|
|
3
3
|
import { default as p } from "./index.es4.js";
|
|
4
|
-
import { default as
|
|
4
|
+
import { default as l } from "./index.es5.js";
|
|
5
5
|
import { default as d } from "./index.es6.js";
|
|
6
6
|
import { default as x } from "./index.es7.js";
|
|
7
7
|
import { default as M } from "./index.es8.js";
|
|
@@ -10,7 +10,7 @@ export {
|
|
|
10
10
|
o as DrawControl,
|
|
11
11
|
t as GeoJsonLayer,
|
|
12
12
|
p as LayerMenu,
|
|
13
|
-
|
|
13
|
+
l as LocationMarkers,
|
|
14
14
|
y as Map,
|
|
15
15
|
d as MapControl,
|
|
16
16
|
x as MapDraw,
|
package/dist/index.es17.js
CHANGED
package/dist/index.es193.js
CHANGED
package/dist/index.es213.js
CHANGED
package/dist/index.es226.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
return function(t) {
|
|
4
|
-
var r = e(t);
|
|
5
|
-
return typeof r == "number" && r >= 0 && r <= o;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
1
|
+
import t from "./index.es191.js";
|
|
2
|
+
const a = t("Object");
|
|
8
3
|
export {
|
|
9
|
-
|
|
4
|
+
a as default
|
|
10
5
|
};
|
|
11
6
|
//# sourceMappingURL=index.es226.js.map
|
package/dist/index.es226.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es226.js","sources":["../../../node_modules/underscore/modules/
|
|
1
|
+
{"version":3,"file":"index.es226.js","sources":["../../../node_modules/underscore/modules/_hasObjectTag.js"],"sourcesContent":["import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n"],"names":["hasObjectTag","tagTester"],"mappings":";AAEA,MAAeA,IAAAC,EAAU,QAAQ;","x_google_ignoreList":[0]}
|
package/dist/index.es228.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { MAX_ARRAY_INDEX as o } from "./index.es15.js";
|
|
2
|
+
function u(e) {
|
|
3
|
+
return function(t) {
|
|
4
|
+
var r = e(t);
|
|
5
|
+
return typeof r == "number" && r >= 0 && r <= o;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
3
8
|
export {
|
|
4
|
-
|
|
9
|
+
u as default
|
|
5
10
|
};
|
|
6
11
|
//# sourceMappingURL=index.es228.js.map
|
package/dist/index.es228.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es228.js","sources":["../../../node_modules/underscore/modules/
|
|
1
|
+
{"version":3,"file":"index.es228.js","sources":["../../../node_modules/underscore/modules/_createSizePropertyCheck.js"],"sourcesContent":["import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n"],"names":["createSizePropertyCheck","getSizeProperty","collection","sizeProperty","MAX_ARRAY_INDEX"],"mappings":";AAGA,SAAwBA,EAAwBC,GAAiB;AAC/D,SAAO,SAASC,GAAY;AACtB,QAAAC,IAAeF,EAAgBC,CAAU;AAC7C,WAAO,OAAOC,KAAgB,YAAYA,KAAgB,KAAKA,KAAgBC;AAAA,EAAA;AAEnF;","x_google_ignoreList":[0]}
|
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/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
|
*/
|
|
@@ -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/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';
|