@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.
Files changed (363) hide show
  1. package/build/index.js +2 -0
  2. package/build/index.js.map +1 -0
  3. package/build/main.css +127 -0
  4. package/dist/index.cjs.js +1 -1
  5. package/dist/index.cjs104.js +1 -1
  6. package/dist/index.cjs105.js +1 -1
  7. package/dist/index.cjs106.js +1 -1
  8. package/dist/index.cjs107.js +1 -1
  9. package/dist/index.cjs110.js +1 -1
  10. package/dist/index.cjs111.js +1 -1
  11. package/dist/index.cjs112.js +1 -1
  12. package/dist/index.cjs116.js +1 -1
  13. package/dist/index.cjs119.js +1 -1
  14. package/dist/index.cjs123.js +1 -1
  15. package/dist/index.cjs126.js +1 -1
  16. package/dist/index.cjs134.js +1 -1
  17. package/dist/index.cjs135.js +1 -1
  18. package/dist/index.cjs136.js +1 -1
  19. package/dist/index.cjs137.js +1 -1
  20. package/dist/index.cjs138.js +1 -1
  21. package/dist/index.cjs139.js +1 -1
  22. package/dist/index.cjs140.js +1 -1
  23. package/dist/index.cjs142.js +1 -1
  24. package/dist/index.cjs143.js +1 -1
  25. package/dist/index.cjs144.js +1 -1
  26. package/dist/index.cjs145.js +1 -1
  27. package/dist/index.cjs146.js +1 -1
  28. package/dist/index.cjs147.js +1 -1
  29. package/dist/index.cjs148.js +1 -1
  30. package/dist/index.cjs149.js +1 -1
  31. package/dist/index.cjs150.js +1 -1
  32. package/dist/index.cjs153.js +1 -1
  33. package/dist/index.cjs154.js +1 -1
  34. package/dist/index.cjs156.js +1 -1
  35. package/dist/index.cjs157.js +1 -1
  36. package/dist/index.cjs158.js +1 -1
  37. package/dist/index.cjs159.js +1 -1
  38. package/dist/index.cjs16.js +1 -1
  39. package/dist/index.cjs160.js +1 -1
  40. package/dist/index.cjs161.js +1 -1
  41. package/dist/index.cjs162.js +1 -1
  42. package/dist/index.cjs163.js +1 -1
  43. package/dist/index.cjs169.js +1 -1
  44. package/dist/index.cjs17.js +1 -1
  45. package/dist/index.cjs170.js +1 -1
  46. package/dist/index.cjs171.js +1 -1
  47. package/dist/index.cjs172.js +1 -1
  48. package/dist/index.cjs173.js +1 -1
  49. package/dist/index.cjs18.js +1 -1
  50. package/dist/index.cjs191.js +1 -1
  51. package/dist/index.cjs191.js.map +1 -1
  52. package/dist/index.cjs192.js +1 -1
  53. package/dist/index.cjs192.js.map +1 -1
  54. package/dist/index.cjs193.js +1 -1
  55. package/dist/index.cjs193.js.map +1 -1
  56. package/dist/index.cjs194.js +1 -1
  57. package/dist/index.cjs194.js.map +1 -1
  58. package/dist/index.cjs195.js +1 -1
  59. package/dist/index.cjs195.js.map +1 -1
  60. package/dist/index.cjs196.js +1 -1
  61. package/dist/index.cjs196.js.map +1 -1
  62. package/dist/index.cjs197.js +1 -1
  63. package/dist/index.cjs197.js.map +1 -1
  64. package/dist/index.cjs198.js +1 -1
  65. package/dist/index.cjs198.js.map +1 -1
  66. package/dist/index.cjs199.js +1 -1
  67. package/dist/index.cjs199.js.map +1 -1
  68. package/dist/index.cjs20.js +1 -1
  69. package/dist/index.cjs200.js +1 -1
  70. package/dist/index.cjs200.js.map +1 -1
  71. package/dist/index.cjs201.js +1 -1
  72. package/dist/index.cjs201.js.map +1 -1
  73. package/dist/index.cjs202.js +1 -1
  74. package/dist/index.cjs202.js.map +1 -1
  75. package/dist/index.cjs203.js +1 -1
  76. package/dist/index.cjs203.js.map +1 -1
  77. package/dist/index.cjs204.js +1 -1
  78. package/dist/index.cjs204.js.map +1 -1
  79. package/dist/index.cjs205.js +1 -1
  80. package/dist/index.cjs205.js.map +1 -1
  81. package/dist/index.cjs206.js +1 -1
  82. package/dist/index.cjs206.js.map +1 -1
  83. package/dist/index.cjs207.js +1 -1
  84. package/dist/index.cjs207.js.map +1 -1
  85. package/dist/index.cjs208.js +1 -1
  86. package/dist/index.cjs208.js.map +1 -1
  87. package/dist/index.cjs209.js +1 -1
  88. package/dist/index.cjs209.js.map +1 -1
  89. package/dist/index.cjs21.js +1 -1
  90. package/dist/index.cjs210.js +1 -1
  91. package/dist/index.cjs210.js.map +1 -1
  92. package/dist/index.cjs211.js +1 -1
  93. package/dist/index.cjs211.js.map +1 -1
  94. package/dist/index.cjs212.js +1 -1
  95. package/dist/index.cjs212.js.map +1 -1
  96. package/dist/index.cjs213.js +1 -1
  97. package/dist/index.cjs213.js.map +1 -1
  98. package/dist/index.cjs214.js +1 -1
  99. package/dist/index.cjs214.js.map +1 -1
  100. package/dist/index.cjs215.js +1 -1
  101. package/dist/index.cjs215.js.map +1 -1
  102. package/dist/index.cjs216.js +1 -1
  103. package/dist/index.cjs216.js.map +1 -1
  104. package/dist/index.cjs217.js +1 -1
  105. package/dist/index.cjs217.js.map +1 -1
  106. package/dist/index.cjs218.js +1 -1
  107. package/dist/index.cjs218.js.map +1 -1
  108. package/dist/index.cjs219.js +1 -1
  109. package/dist/index.cjs219.js.map +1 -1
  110. package/dist/index.cjs22.js +1 -1
  111. package/dist/index.cjs220.js +1 -1
  112. package/dist/index.cjs220.js.map +1 -1
  113. package/dist/index.cjs221.js +1 -1
  114. package/dist/index.cjs221.js.map +1 -1
  115. package/dist/index.cjs222.js +1 -1
  116. package/dist/index.cjs222.js.map +1 -1
  117. package/dist/index.cjs223.js +1 -1
  118. package/dist/index.cjs223.js.map +1 -1
  119. package/dist/index.cjs224.js +1 -1
  120. package/dist/index.cjs224.js.map +1 -1
  121. package/dist/index.cjs225.js +1 -1
  122. package/dist/index.cjs225.js.map +1 -1
  123. package/dist/index.cjs226.js +1 -1
  124. package/dist/index.cjs226.js.map +1 -1
  125. package/dist/index.cjs227.js +1 -1
  126. package/dist/index.cjs227.js.map +1 -1
  127. package/dist/index.cjs228.js +1 -1
  128. package/dist/index.cjs228.js.map +1 -1
  129. package/dist/index.cjs229.js +1 -1
  130. package/dist/index.cjs229.js.map +1 -1
  131. package/dist/index.cjs230.js +1 -1
  132. package/dist/index.cjs230.js.map +1 -1
  133. package/dist/index.cjs238.js +1 -1
  134. package/dist/index.cjs24.js +1 -1
  135. package/dist/index.cjs243.js +1 -1
  136. package/dist/index.cjs246.js +1 -1
  137. package/dist/index.cjs25.js +1 -1
  138. package/dist/index.cjs250.js +1 -1
  139. package/dist/index.cjs250.js.map +1 -1
  140. package/dist/index.cjs251.js +1 -1
  141. package/dist/index.cjs251.js.map +1 -1
  142. package/dist/index.cjs26.js +1 -1
  143. package/dist/index.cjs28.js +1 -1
  144. package/dist/index.cjs29.js +1 -1
  145. package/dist/index.cjs30.js +1 -1
  146. package/dist/index.cjs34.js +1 -1
  147. package/dist/index.cjs35.js +1 -1
  148. package/dist/index.cjs36.js +1 -1
  149. package/dist/index.cjs38.js +1 -1
  150. package/dist/index.cjs39.js +1 -1
  151. package/dist/index.cjs41.js +1 -1
  152. package/dist/index.cjs5.js +1 -1
  153. package/dist/index.cjs5.js.map +1 -1
  154. package/dist/index.cjs62.js +1 -1
  155. package/dist/index.cjs63.js +1 -1
  156. package/dist/index.cjs64.js +1 -1
  157. package/dist/index.cjs65.js +1 -1
  158. package/dist/index.cjs66.js +1 -1
  159. package/dist/index.cjs67.js +1 -1
  160. package/dist/index.cjs68.js +1 -1
  161. package/dist/index.cjs69.js +1 -1
  162. package/dist/index.cjs70.js +1 -1
  163. package/dist/index.cjs71.js +1 -1
  164. package/dist/index.cjs72.js +1 -1
  165. package/dist/index.cjs75.js +1 -1
  166. package/dist/index.cjs82.js +1 -1
  167. package/dist/index.cjs83.js +1 -1
  168. package/dist/index.cjs84.js +1 -1
  169. package/dist/index.cjs85.js +1 -1
  170. package/dist/index.cjs86.js +1 -1
  171. package/dist/index.cjs87.js +1 -1
  172. package/dist/index.cjs88.js +1 -1
  173. package/dist/index.cjs89.js +1 -1
  174. package/dist/index.cjs90.js +1 -1
  175. package/dist/index.cjs93.js +1 -1
  176. package/dist/index.cjs94.js +1 -1
  177. package/dist/index.cjs96.js +1 -1
  178. package/dist/index.cjs97.js +1 -1
  179. package/dist/index.cjs98.js +1 -1
  180. package/dist/index.cjs99.js +1 -1
  181. package/dist/index.es.js +2 -2
  182. package/dist/index.es104.js +1 -1
  183. package/dist/index.es105.js +1 -1
  184. package/dist/index.es106.js +1 -1
  185. package/dist/index.es107.js +1 -1
  186. package/dist/index.es110.js +2 -2
  187. package/dist/index.es111.js +2 -2
  188. package/dist/index.es112.js +1 -1
  189. package/dist/index.es116.js +2 -2
  190. package/dist/index.es119.js +1 -1
  191. package/dist/index.es123.js +1 -1
  192. package/dist/index.es126.js +1 -1
  193. package/dist/index.es134.js +1 -1
  194. package/dist/index.es135.js +1 -1
  195. package/dist/index.es136.js +1 -1
  196. package/dist/index.es137.js +2 -2
  197. package/dist/index.es138.js +1 -1
  198. package/dist/index.es139.js +1 -1
  199. package/dist/index.es140.js +1 -1
  200. package/dist/index.es142.js +2 -2
  201. package/dist/index.es143.js +2 -2
  202. package/dist/index.es144.js +1 -1
  203. package/dist/index.es145.js +1 -1
  204. package/dist/index.es146.js +1 -1
  205. package/dist/index.es147.js +1 -1
  206. package/dist/index.es148.js +2 -2
  207. package/dist/index.es149.js +2 -2
  208. package/dist/index.es150.js +1 -1
  209. package/dist/index.es153.js +2 -2
  210. package/dist/index.es154.js +2 -2
  211. package/dist/index.es156.js +2 -2
  212. package/dist/index.es157.js +1 -1
  213. package/dist/index.es158.js +2 -2
  214. package/dist/index.es159.js +1 -1
  215. package/dist/index.es16.js +1 -1
  216. package/dist/index.es160.js +2 -2
  217. package/dist/index.es161.js +1 -1
  218. package/dist/index.es162.js +1 -1
  219. package/dist/index.es163.js +1 -1
  220. package/dist/index.es169.js +1 -1
  221. package/dist/index.es17.js +1 -1
  222. package/dist/index.es170.js +2 -2
  223. package/dist/index.es171.js +1 -1
  224. package/dist/index.es172.js +1 -1
  225. package/dist/index.es173.js +1 -1
  226. package/dist/index.es18.js +2 -2
  227. package/dist/index.es191.js +320 -7
  228. package/dist/index.es191.js.map +1 -1
  229. package/dist/index.es192.js +74 -4
  230. package/dist/index.es192.js.map +1 -1
  231. package/dist/index.es193.js +3 -4
  232. package/dist/index.es193.js.map +1 -1
  233. package/dist/index.es194.js +16 -3
  234. package/dist/index.es194.js.map +1 -1
  235. package/dist/index.es195.js +11 -3
  236. package/dist/index.es195.js.map +1 -1
  237. package/dist/index.es196.js +30 -8
  238. package/dist/index.es196.js.map +1 -1
  239. package/dist/index.es197.js +4 -21
  240. package/dist/index.es197.js.map +1 -1
  241. package/dist/index.es198.js +2 -22
  242. package/dist/index.es198.js.map +1 -1
  243. package/dist/index.es199.js +6 -12
  244. package/dist/index.es199.js.map +1 -1
  245. package/dist/index.es20.js +2 -2
  246. package/dist/index.es200.js +4 -16
  247. package/dist/index.es200.js.map +1 -1
  248. package/dist/index.es201.js +4 -6
  249. package/dist/index.es201.js.map +1 -1
  250. package/dist/index.es202.js +3 -9
  251. package/dist/index.es202.js.map +1 -1
  252. package/dist/index.es203.js +3 -7
  253. package/dist/index.es203.js.map +1 -1
  254. package/dist/index.es204.js +8 -21
  255. package/dist/index.es204.js.map +1 -1
  256. package/dist/index.es205.js +20 -8
  257. package/dist/index.es205.js.map +1 -1
  258. package/dist/index.es206.js +22 -9
  259. package/dist/index.es206.js.map +1 -1
  260. package/dist/index.es207.js +14 -4
  261. package/dist/index.es207.js.map +1 -1
  262. package/dist/index.es208.js +16 -10
  263. package/dist/index.es208.js.map +1 -1
  264. package/dist/index.es209.js +5 -8
  265. package/dist/index.es209.js.map +1 -1
  266. package/dist/index.es21.js +2 -2
  267. package/dist/index.es210.js +7 -21
  268. package/dist/index.es210.js.map +1 -1
  269. package/dist/index.es211.js +6 -11
  270. package/dist/index.es211.js.map +1 -1
  271. package/dist/index.es212.js +20 -17
  272. package/dist/index.es212.js.map +1 -1
  273. package/dist/index.es213.js +10 -4
  274. package/dist/index.es213.js.map +1 -1
  275. package/dist/index.es214.js +9 -18
  276. package/dist/index.es214.js.map +1 -1
  277. package/dist/index.es215.js +4 -12
  278. package/dist/index.es215.js.map +1 -1
  279. package/dist/index.es216.js +10 -3
  280. package/dist/index.es216.js.map +1 -1
  281. package/dist/index.es217.js +8 -4
  282. package/dist/index.es217.js.map +1 -1
  283. package/dist/index.es218.js +22 -320
  284. package/dist/index.es218.js.map +1 -1
  285. package/dist/index.es219.js +10 -73
  286. package/dist/index.es219.js.map +1 -1
  287. package/dist/index.es22.js +2 -2
  288. package/dist/index.es220.js +19 -3
  289. package/dist/index.es220.js.map +1 -1
  290. package/dist/index.es221.js +4 -16
  291. package/dist/index.es221.js.map +1 -1
  292. package/dist/index.es222.js +17 -10
  293. package/dist/index.es222.js.map +1 -1
  294. package/dist/index.es223.js +11 -30
  295. package/dist/index.es223.js.map +1 -1
  296. package/dist/index.es224.js +3 -4
  297. package/dist/index.es224.js.map +1 -1
  298. package/dist/index.es225.js +5 -2
  299. package/dist/index.es225.js.map +1 -1
  300. package/dist/index.es226.js +46 -3
  301. package/dist/index.es226.js.map +1 -1
  302. package/dist/index.es227.js +22 -5
  303. package/dist/index.es227.js.map +1 -1
  304. package/dist/index.es228.js +3 -8
  305. package/dist/index.es228.js.map +1 -1
  306. package/dist/index.es229.js +6 -44
  307. package/dist/index.es229.js.map +1 -1
  308. package/dist/index.es230.js +5 -22
  309. package/dist/index.es230.js.map +1 -1
  310. package/dist/index.es238.js +1 -1
  311. package/dist/index.es24.js +1 -1
  312. package/dist/index.es243.js +1 -1
  313. package/dist/index.es246.js +1 -1
  314. package/dist/index.es25.js +2 -2
  315. package/dist/index.es250.js +15 -4
  316. package/dist/index.es250.js.map +1 -1
  317. package/dist/index.es251.js +4 -15
  318. package/dist/index.es251.js.map +1 -1
  319. package/dist/index.es26.js +2 -2
  320. package/dist/index.es28.js +1 -1
  321. package/dist/index.es29.js +1 -1
  322. package/dist/index.es30.js +1 -1
  323. package/dist/index.es34.js +2 -2
  324. package/dist/index.es35.js +3 -3
  325. package/dist/index.es36.js +1 -1
  326. package/dist/index.es38.js +1 -1
  327. package/dist/index.es39.js +1 -1
  328. package/dist/index.es41.js +1 -1
  329. package/dist/index.es5.js +14 -16
  330. package/dist/index.es5.js.map +1 -1
  331. package/dist/index.es62.js +1 -1
  332. package/dist/index.es63.js +4 -4
  333. package/dist/index.es64.js +2 -2
  334. package/dist/index.es65.js +2 -2
  335. package/dist/index.es66.js +1 -1
  336. package/dist/index.es67.js +1 -1
  337. package/dist/index.es68.js +1 -1
  338. package/dist/index.es69.js +1 -1
  339. package/dist/index.es70.js +1 -1
  340. package/dist/index.es71.js +2 -2
  341. package/dist/index.es72.js +2 -2
  342. package/dist/index.es75.js +1 -1
  343. package/dist/index.es82.js +1 -1
  344. package/dist/index.es83.js +1 -1
  345. package/dist/index.es84.js +1 -1
  346. package/dist/index.es85.js +1 -1
  347. package/dist/index.es86.js +1 -1
  348. package/dist/index.es87.js +1 -1
  349. package/dist/index.es88.js +1 -1
  350. package/dist/index.es89.js +1 -1
  351. package/dist/index.es90.js +1 -1
  352. package/dist/index.es93.js +1 -1
  353. package/dist/index.es94.js +1 -1
  354. package/dist/index.es96.js +3 -3
  355. package/dist/index.es97.js +1 -1
  356. package/dist/index.es98.js +2 -2
  357. package/dist/index.es99.js +1 -1
  358. package/package.json +1 -1
  359. package/src/components/{LocationMarker.js → LocationMarkers.js} +13 -8
  360. package/src/index.js +1 -1
  361. package/types/components/LocationMarker.js.flow +10 -5
  362. package/types/components/LocationMarkers.js.flow +82 -0
  363. 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 i, PulsingMarkerLayer as o, MixedGeoJSONLayer as f } from "@peripleo/maplibre";
3
- import { useEffect as l } from "react";
4
- import { DEFAULT_FILL_STYLE as n, DEFAULT_POINT_STYLE as d, DEFAULT_STROKE_STYLE as u } from "./index.es45.js";
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 m = 2, s = (t) => {
7
- const a = i();
8
- return l(() => {
6
+ const u = 2, s = (t) => {
7
+ const a = o();
8
+ return n(() => {
9
9
  if (a && t.data) {
10
- const r = S.getBoundingBox(t.data, t.buffer);
11
- a.fitBounds(r);
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
- o,
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
- f,
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: m,
35
- fillStyle: n,
32
+ buffer: u,
33
+ fillStyle: r,
36
34
  pointStyle: d,
37
- strokeStyle: u
35
+ strokeStyle: m
38
36
  };
39
37
  export {
40
38
  s as default
@@ -1 +1 @@
1
- {"version":3,"file":"index.es5.js","sources":["../src/components/LocationMarker.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 * 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 LocationMarker = (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 <PulsingMarkerLayer\n id='current'\n data={props.data}\n />\n <MixedGeoJSONLayer\n id='current'\n data={props.data}\n fillStyle={props.fillStyle}\n strokeStyle={props.strokeStyle}\n pointStyle={props.pointStyle}\n />\n </>\n );\n};\n\nLocationMarker.defaultProps = {\n buffer: DEFAULT_BUFFER,\n fillStyle: DEFAULT_FILL_STYLE,\n pointStyle: DEFAULT_POINT_STYLE,\n strokeStyle: DEFAULT_STROKE_STYLE\n};\n\nexport default LocationMarker;\n"],"names":["DEFAULT_BUFFER","LocationMarker","props","map","useMap","useEffect","boundingBox","MapUtils","jsxs","Fragment","jsx","PulsingMarkerLayer","MixedGeoJSONLayer","DEFAULT_FILL_STYLE","DEFAULT_POINT_STYLE","DEFAULT_STROKE_STYLE"],"mappings":";;;;;AAkCA,MAAMA,IAAiB,GAKjBC,IAAiB,CAACC,MAAiB;AACvC,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,GAI9BM,gBAAAA,EAAA,KAAAC,YAAA,EAAA,UAAA;AAAA,IAAAC,gBAAAA,EAAA;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,MAAMT,EAAM;AAAA,MAAA;AAAA,IACd;AAAA,IACAQ,gBAAAA,EAAA;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,MAAMV,EAAM;AAAA,QACZ,WAAWA,EAAM;AAAA,QACjB,aAAaA,EAAM;AAAA,QACnB,YAAYA,EAAM;AAAA,MAAA;AAAA,IACpB;AAAA,EACF,EAAA,CAAA;AAEJ;AAEAD,EAAe,eAAe;AAAA,EAC5B,QAAQD;AAAA,EACR,WAAWa;AAAA,EACX,YAAYC;AAAA,EACZ,aAAaC;AACf;"}
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;"}
@@ -1,4 +1,4 @@
1
- import { __exports as a } from "./index.es225.js";
1
+ import { __exports as a } from "./index.es198.js";
2
2
  function i(r, s) {
3
3
  for (var o = 0; o < s.length; o++) {
4
4
  const e = s[o];
@@ -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.es218.js";
5
- import I from "./index.es219.js";
6
- import C from "./index.es220.js";
7
- import g from "./index.es221.js";
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 });
@@ -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.es222.js";
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.es223.js";
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;
@@ -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.es222.js";
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.es223.js";
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
  }
@@ -1,5 +1,5 @@
1
1
  import { memo as i, useEffect as r } from "react";
2
- import { applyReactStyle as e } from "./index.es222.js";
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), {
@@ -1,5 +1,5 @@
1
1
  import { memo as o, useEffect as l } from "react";
2
- import { applyReactStyle as r } from "./index.es222.js";
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({
@@ -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.es222.js";
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 }) => {
@@ -1,5 +1,5 @@
1
1
  import { memo as i, useEffect as e } from "react";
2
- import { applyReactStyle as l } from "./index.es222.js";
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), {
@@ -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.es222.js";
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), {
@@ -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.es224.js";
4
- import { deepEqual as l } from "./index.es223.js";
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;
@@ -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.es224.js";
5
- import { deepEqual as v } from "./index.es223.js";
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) {
@@ -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.es217.js";
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];
@@ -1,4 +1,4 @@
1
- import t from "./index.es191.js";
1
+ import t from "./index.es199.js";
2
2
  const e = t("String");
3
3
  export {
4
4
  e as default
@@ -1,4 +1,4 @@
1
- import e from "./index.es191.js";
1
+ import e from "./index.es199.js";
2
2
  const t = e("Number");
3
3
  export {
4
4
  t as default
@@ -1,4 +1,4 @@
1
- import t from "./index.es191.js";
1
+ import t from "./index.es199.js";
2
2
  const a = t("Date");
3
3
  export {
4
4
  a as default
@@ -1,4 +1,4 @@
1
- import e from "./index.es191.js";
1
+ import e from "./index.es199.js";
2
2
  const o = e("RegExp");
3
3
  export {
4
4
  o as default
@@ -1,4 +1,4 @@
1
- import r from "./index.es191.js";
1
+ import r from "./index.es199.js";
2
2
  const t = r("Error");
3
3
  export {
4
4
  t as default
@@ -1,4 +1,4 @@
1
- import o from "./index.es191.js";
1
+ import o from "./index.es199.js";
2
2
  const e = o("Symbol");
3
3
  export {
4
4
  e as default
@@ -1,4 +1,4 @@
1
- import r from "./index.es191.js";
1
+ import r from "./index.es199.js";
2
2
  const f = r("ArrayBuffer");
3
3
  export {
4
4
  f as default
@@ -1,4 +1,4 @@
1
- import r from "./index.es191.js";
1
+ import r from "./index.es199.js";
2
2
  import i from "./index.es16.js";
3
3
  import a from "./index.es88.js";
4
4
  import { hasStringTagBug as e } from "./index.es17.js";
@@ -1,5 +1,5 @@
1
1
  import { nativeIsArray as r } from "./index.es15.js";
2
- import t from "./index.es191.js";
2
+ import t from "./index.es199.js";
3
3
  const e = r || t("Array");
4
4
  export {
5
5
  e as default
@@ -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.es193.js";
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));
@@ -1,4 +1,4 @@
1
- import e from "./index.es194.js";
1
+ import e from "./index.es202.js";
2
2
  import i from "./index.es90.js";
3
3
  import m from "./index.es82.js";
4
4
  import n from "./index.es18.js";
@@ -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.es195.js";
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.es192.js";
10
- import d from "./index.es196.js";
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)
@@ -1,4 +1,4 @@
1
- import e from "./index.es191.js";
1
+ import e from "./index.es199.js";
2
2
  const a = e("WeakSet");
3
3
  export {
4
4
  a as default
@@ -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.es192.js";
4
- import o from "./index.es198.js";
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 [];
@@ -1,6 +1,6 @@
1
1
  import e from "./index.es77.js";
2
2
  import { hasEnumBug as f } from "./index.es15.js";
3
- import i from "./index.es198.js";
3
+ import i from "./index.es206.js";
4
4
  function s(r) {
5
5
  if (!e(r))
6
6
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@performant-software/geospatial",
3
- "version": "2.1.0-beta.2",
3
+ "version": "2.1.0-beta.3",
4
4
  "description": "A package of components for all things map-related.",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.cjs.js",
@@ -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 LocationMarker = (props: Props) => {
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
- <PulsingMarkerLayer
56
- id='current'
57
- data={props.data}
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
- LocationMarker.defaultProps = {
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 LocationMarker;
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 LocationMarker } from './components/LocationMarker';
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
- <PulsingMarkerLayer
56
- id='current'
57
- data={props.data}
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;
@@ -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 LocationMarker } from './components/LocationMarker';
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';