@mapcomponents/react-maplibre 0.1.42 → 0.1.45
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/CHANGELOG.md +16 -0
- package/coverage/clover.xml +51 -49
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov-report/index.html +14 -14
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/index.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.js.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +1 -1
- package/coverage/lcov-report/src/contexts/MapContext.tsx.html +1 -1
- package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
- package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
- package/coverage/lcov-report/src/contexts/index.html +1 -1
- package/coverage/lcov-report/src/hooks/index.html +15 -15
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +38 -29
- package/coverage/lcov-report/src/hooks/useMap.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useMapState.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useWms.js.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +1 -1
- package/coverage/lcov.info +102 -105
- package/dist/index.esm.js +11 -10
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useLayer.ts +14 -11
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">73.77% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>45/61</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">66.66% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>36/54</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">74.13% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>43/58</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -247,7 +247,10 @@
|
|
|
247
247
|
<a name='L182'></a><a href='#L182'>182</a>
|
|
248
248
|
<a name='L183'></a><a href='#L183'>183</a>
|
|
249
249
|
<a name='L184'></a><a href='#L184'>184</a>
|
|
250
|
-
<a name='L185'></a><a href='#L185'>185</a
|
|
250
|
+
<a name='L185'></a><a href='#L185'>185</a>
|
|
251
|
+
<a name='L186'></a><a href='#L186'>186</a>
|
|
252
|
+
<a name='L187'></a><a href='#L187'>187</a>
|
|
253
|
+
<a name='L188'></a><a href='#L188'>188</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
251
254
|
<span class="cline-any cline-neutral"> </span>
|
|
252
255
|
<span class="cline-any cline-neutral"> </span>
|
|
253
256
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -307,6 +310,13 @@
|
|
|
307
310
|
<span class="cline-any cline-neutral"> </span>
|
|
308
311
|
<span class="cline-any cline-yes">60x</span>
|
|
309
312
|
<span class="cline-any cline-yes">14x</span>
|
|
313
|
+
<span class="cline-any cline-neutral"> </span>
|
|
314
|
+
<span class="cline-any cline-yes">14x</span>
|
|
315
|
+
<span class="cline-any cline-no"> </span>
|
|
316
|
+
<span class="cline-any cline-neutral"> </span>
|
|
317
|
+
<span class="cline-any cline-yes">14x</span>
|
|
318
|
+
<span class="cline-any cline-no"> </span>
|
|
319
|
+
<span class="cline-any cline-neutral"> </span>
|
|
310
320
|
<span class="cline-any cline-yes">14x</span>
|
|
311
321
|
<span class="cline-any cline-neutral"> </span>
|
|
312
322
|
<span class="cline-any cline-yes">14x</span>
|
|
@@ -358,15 +368,6 @@
|
|
|
358
368
|
<span class="cline-any cline-neutral"> </span>
|
|
359
369
|
<span class="cline-any cline-neutral"> </span>
|
|
360
370
|
<span class="cline-any cline-neutral"> </span>
|
|
361
|
-
<span class="cline-any cline-neutral"> </span>
|
|
362
|
-
<span class="cline-any cline-neutral"> </span>
|
|
363
|
-
<span class="cline-any cline-no"> </span>
|
|
364
|
-
<span class="cline-any cline-yes">32x</span>
|
|
365
|
-
<span class="cline-any cline-neutral"> </span>
|
|
366
|
-
<span class="cline-any cline-neutral"> </span>
|
|
367
|
-
<span class="cline-any cline-neutral"> </span>
|
|
368
|
-
<span class="cline-any cline-neutral"> </span>
|
|
369
|
-
<span class="cline-any cline-neutral"> </span>
|
|
370
371
|
<span class="cline-any cline-yes">18x</span>
|
|
371
372
|
<span class="cline-any cline-neutral"> </span>
|
|
372
373
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -382,6 +383,11 @@
|
|
|
382
383
|
<span class="cline-any cline-neutral"> </span>
|
|
383
384
|
<span class="cline-any cline-yes">60x</span>
|
|
384
385
|
<span class="cline-any cline-yes">60x</span>
|
|
386
|
+
<span class="cline-any cline-neutral"> </span>
|
|
387
|
+
<span class="cline-any cline-neutral"> </span>
|
|
388
|
+
<span class="cline-any cline-neutral"> </span>
|
|
389
|
+
<span class="cline-any cline-neutral"> </span>
|
|
390
|
+
<span class="cline-any cline-neutral"> </span>
|
|
385
391
|
<span class="cline-any cline-yes">28x</span>
|
|
386
392
|
<span class="cline-any cline-neutral"> </span>
|
|
387
393
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -490,7 +496,14 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
490
496
|
);
|
|
491
497
|
|
|
492
498
|
const createLayer = useCallback(() => {
|
|
493
|
-
<span class="missing-if-branch" title="if path not taken" >I</span>if (
|
|
499
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!mapHook.map) <span class="cstat-no" title="statement not covered" >return;</span>
|
|
500
|
+
|
|
501
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (mapHook.map.map.getLayer(layerId.current)) {
|
|
502
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.map.removeLayer(layerId.current);</span>
|
|
503
|
+
}
|
|
504
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (mapHook.map.map.getSource(layerId.current)) {
|
|
505
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.map.removeSource(layerId.current);</span>
|
|
506
|
+
}
|
|
494
507
|
initializedRef.current = true;
|
|
495
508
|
|
|
496
509
|
mapHook.map.addLayer(
|
|
@@ -536,16 +549,7 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
536
549
|
useEffect(() => {
|
|
537
550
|
if (!mapHook.map) return;
|
|
538
551
|
|
|
539
|
-
|
|
540
|
-
initializedRef.current &&
|
|
541
|
-
((props.options.type && legalLayerTypes.indexOf(props.options.type) !== -1) ||
|
|
542
|
-
<span class="branch-3 cbranch-no" title="branch not covered" > !props.options.type)</span> &&
|
|
543
|
-
layerTypeRef.current &&
|
|
544
|
-
props.options.type !== layerTypeRef.current
|
|
545
|
-
) {
|
|
546
|
-
// remove (cleanup) & reinitialize the layer if type has changed
|
|
547
|
-
<span class="cstat-no" title="statement not covered" > cleanup();</span>
|
|
548
|
-
} else if (
|
|
552
|
+
if (
|
|
549
553
|
initializedRef.current &&
|
|
550
554
|
(legalLayerTypes.indexOf(props.options.type) === -1 ||
|
|
551
555
|
(legalLayerTypes.indexOf(props.options.type) !== -1 &&
|
|
@@ -565,7 +569,12 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
565
569
|
}, [props.geojson, mapHook.map, props.options.type]);
|
|
566
570
|
|
|
567
571
|
useEffect(() => {
|
|
568
|
-
if (
|
|
572
|
+
if (
|
|
573
|
+
!mapHook.map ||
|
|
574
|
+
!mapHook.map?.map?.getLayer?.(layerId.current) ||
|
|
575
|
+
!initializedRef.current ||
|
|
576
|
+
props.options.type !== layerTypeRef.current
|
|
577
|
+
)
|
|
569
578
|
return;
|
|
570
579
|
|
|
571
580
|
var key;
|
|
@@ -622,7 +631,7 @@ export default useLayer;
|
|
|
622
631
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
623
632
|
Code coverage generated by
|
|
624
633
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
625
|
-
at Tue May 10 2022
|
|
634
|
+
at Tue May 10 2022 16:37:34 GMT+0000 (Coordinated Universal Time)
|
|
626
635
|
</div>
|
|
627
636
|
<script src="../../prettify.js"></script>
|
|
628
637
|
<script>
|
|
@@ -340,7 +340,7 @@ export type { useMapType };
|
|
|
340
340
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
341
341
|
Code coverage generated by
|
|
342
342
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
343
|
-
at Tue May 10 2022
|
|
343
|
+
at Tue May 10 2022 16:37:34 GMT+0000 (Coordinated Universal Time)
|
|
344
344
|
</div>
|
|
345
345
|
<script src="../../prettify.js"></script>
|
|
346
346
|
<script>
|
|
@@ -637,7 +637,7 @@ export default useMapState;
|
|
|
637
637
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
638
638
|
Code coverage generated by
|
|
639
639
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
640
|
-
at Tue May 10 2022
|
|
640
|
+
at Tue May 10 2022 16:37:34 GMT+0000 (Coordinated Universal Time)
|
|
641
641
|
</div>
|
|
642
642
|
<script src="../../prettify.js"></script>
|
|
643
643
|
<script>
|
|
@@ -343,7 +343,7 @@ export default useWms;
|
|
|
343
343
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
344
344
|
Code coverage generated by
|
|
345
345
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
346
|
-
at Tue May 10 2022
|
|
346
|
+
at Tue May 10 2022 16:37:34 GMT+0000 (Coordinated Universal Time)
|
|
347
347
|
</div>
|
|
348
348
|
<script src="../../prettify.js"></script>
|
|
349
349
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at Tue May 10 2022
|
|
104
|
+
at Tue May 10 2022 16:37:34 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -181,7 +181,7 @@ export { default as SimpleDataContext } from './contexts/SimpleDataContext';</pr
|
|
|
181
181
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
182
182
|
Code coverage generated by
|
|
183
183
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
184
|
-
at Tue May 10 2022
|
|
184
|
+
at Tue May 10 2022 16:37:34 GMT+0000 (Coordinated Universal Time)
|
|
185
185
|
</div>
|
|
186
186
|
<script src="../prettify.js"></script>
|
|
187
187
|
<script>
|
package/coverage/lcov.info
CHANGED
|
@@ -3003,12 +3003,12 @@ TN:
|
|
|
3003
3003
|
SF:src/hooks/useLayer.ts
|
|
3004
3004
|
FN:42,useLayer
|
|
3005
3005
|
FN:59,(anonymous_1)
|
|
3006
|
-
FN:
|
|
3007
|
-
FN:
|
|
3008
|
-
FN:
|
|
3009
|
-
FN:
|
|
3010
|
-
FN:
|
|
3011
|
-
FN:
|
|
3006
|
+
FN:110,(anonymous_2)
|
|
3007
|
+
FN:125,(anonymous_3)
|
|
3008
|
+
FN:132,(anonymous_4)
|
|
3009
|
+
FN:167,(anonymous_5)
|
|
3010
|
+
FN:172,(anonymous_6)
|
|
3011
|
+
FN:173,(anonymous_7)
|
|
3012
3012
|
FNF:8
|
|
3013
3013
|
FNH:8
|
|
3014
3014
|
FNDA:60,useLayer
|
|
@@ -3029,115 +3029,112 @@ DA:54,60
|
|
|
3029
3029
|
DA:55,60
|
|
3030
3030
|
DA:59,60
|
|
3031
3031
|
DA:60,14
|
|
3032
|
-
DA:
|
|
3033
|
-
DA:63,
|
|
3034
|
-
DA:
|
|
3035
|
-
DA:
|
|
3036
|
-
DA:
|
|
3037
|
-
DA:
|
|
3038
|
-
DA:91,
|
|
3039
|
-
DA:
|
|
3040
|
-
DA:
|
|
3041
|
-
DA:
|
|
3042
|
-
DA:
|
|
3043
|
-
DA:
|
|
3044
|
-
DA:
|
|
3045
|
-
DA:
|
|
3046
|
-
DA:106,
|
|
3047
|
-
DA:
|
|
3048
|
-
DA:
|
|
3049
|
-
DA:
|
|
3050
|
-
DA:
|
|
3051
|
-
DA:
|
|
3052
|
-
DA:
|
|
3053
|
-
DA:
|
|
3054
|
-
DA:
|
|
3055
|
-
DA:
|
|
3056
|
-
DA:
|
|
3057
|
-
DA:
|
|
3058
|
-
DA:
|
|
3059
|
-
DA:
|
|
3060
|
-
DA:144,
|
|
3032
|
+
DA:62,14
|
|
3033
|
+
DA:63,0
|
|
3034
|
+
DA:65,14
|
|
3035
|
+
DA:66,0
|
|
3036
|
+
DA:68,14
|
|
3037
|
+
DA:70,14
|
|
3038
|
+
DA:91,14
|
|
3039
|
+
DA:93,14
|
|
3040
|
+
DA:94,0
|
|
3041
|
+
DA:97,14
|
|
3042
|
+
DA:98,0
|
|
3043
|
+
DA:101,14
|
|
3044
|
+
DA:102,0
|
|
3045
|
+
DA:105,14
|
|
3046
|
+
DA:106,14
|
|
3047
|
+
DA:107,14
|
|
3048
|
+
DA:110,60
|
|
3049
|
+
DA:111,60
|
|
3050
|
+
DA:113,32
|
|
3051
|
+
DA:119,18
|
|
3052
|
+
DA:122,14
|
|
3053
|
+
DA:125,60
|
|
3054
|
+
DA:126,28
|
|
3055
|
+
DA:129,12
|
|
3056
|
+
DA:132,60
|
|
3057
|
+
DA:133,60
|
|
3058
|
+
DA:139,28
|
|
3059
|
+
DA:143,32
|
|
3060
|
+
DA:144,32
|
|
3061
3061
|
DA:145,0
|
|
3062
|
-
DA:
|
|
3062
|
+
DA:147,0
|
|
3063
|
+
DA:148,0
|
|
3063
3064
|
DA:149,0
|
|
3064
|
-
DA:152,
|
|
3065
|
-
DA:
|
|
3066
|
-
DA:
|
|
3067
|
-
DA:155,0
|
|
3068
|
-
DA:156,0
|
|
3065
|
+
DA:152,0
|
|
3066
|
+
DA:155,32
|
|
3067
|
+
DA:156,32
|
|
3069
3068
|
DA:157,0
|
|
3069
|
+
DA:158,0
|
|
3070
|
+
DA:159,0
|
|
3070
3071
|
DA:160,0
|
|
3071
|
-
DA:
|
|
3072
|
-
DA:
|
|
3073
|
-
DA:
|
|
3074
|
-
DA:169,
|
|
3075
|
-
DA:
|
|
3076
|
-
DA:
|
|
3077
|
-
DA:
|
|
3078
|
-
|
|
3079
|
-
|
|
3072
|
+
DA:163,0
|
|
3073
|
+
DA:167,60
|
|
3074
|
+
DA:168,7
|
|
3075
|
+
DA:169,7
|
|
3076
|
+
DA:172,60
|
|
3077
|
+
DA:173,14
|
|
3078
|
+
DA:174,7
|
|
3079
|
+
DA:178,60
|
|
3080
|
+
LF:58
|
|
3081
|
+
LH:43
|
|
3080
3082
|
BRDA:56,0,0,60
|
|
3081
3083
|
BRDA:56,0,1,20
|
|
3082
3084
|
BRDA:56,1,0,20
|
|
3083
3085
|
BRDA:56,1,1,0
|
|
3084
3086
|
BRDA:60,2,0,0
|
|
3085
3087
|
BRDA:60,2,1,14
|
|
3086
|
-
BRDA:
|
|
3087
|
-
BRDA:
|
|
3088
|
-
BRDA:
|
|
3089
|
-
BRDA:
|
|
3090
|
-
BRDA:
|
|
3091
|
-
BRDA:
|
|
3092
|
-
BRDA:
|
|
3093
|
-
BRDA:
|
|
3094
|
-
BRDA:
|
|
3095
|
-
BRDA:
|
|
3096
|
-
BRDA:
|
|
3097
|
-
BRDA:
|
|
3098
|
-
BRDA:
|
|
3099
|
-
BRDA:
|
|
3100
|
-
BRDA:
|
|
3101
|
-
BRDA:
|
|
3102
|
-
BRDA:
|
|
3103
|
-
BRDA:
|
|
3104
|
-
BRDA:
|
|
3105
|
-
BRDA:
|
|
3106
|
-
BRDA:
|
|
3107
|
-
BRDA:
|
|
3108
|
-
BRDA:
|
|
3109
|
-
BRDA:
|
|
3110
|
-
BRDA:
|
|
3111
|
-
BRDA:
|
|
3112
|
-
BRDA:
|
|
3113
|
-
BRDA:
|
|
3114
|
-
BRDA:
|
|
3115
|
-
BRDA:
|
|
3116
|
-
BRDA:
|
|
3117
|
-
BRDA:
|
|
3118
|
-
BRDA:
|
|
3119
|
-
BRDA:
|
|
3120
|
-
BRDA:
|
|
3121
|
-
BRDA:
|
|
3122
|
-
BRDA:
|
|
3123
|
-
BRDA:
|
|
3124
|
-
BRDA:
|
|
3125
|
-
BRDA:
|
|
3126
|
-
BRDA:
|
|
3127
|
-
BRDA:
|
|
3128
|
-
BRDA:
|
|
3129
|
-
BRDA:
|
|
3130
|
-
BRDA:
|
|
3131
|
-
BRDA:
|
|
3132
|
-
BRDA:
|
|
3133
|
-
BRDA:
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
BRDA:156,24,1,0
|
|
3137
|
-
BRDA:156,25,0,0
|
|
3138
|
-
BRDA:156,25,1,0
|
|
3139
|
-
BRF:59
|
|
3140
|
-
BRH:41
|
|
3088
|
+
BRDA:62,3,0,0
|
|
3089
|
+
BRDA:62,3,1,14
|
|
3090
|
+
BRDA:65,4,0,0
|
|
3091
|
+
BRDA:65,4,1,14
|
|
3092
|
+
BRDA:73,5,0,8
|
|
3093
|
+
BRDA:73,5,1,6
|
|
3094
|
+
BRDA:83,6,0,0
|
|
3095
|
+
BRDA:83,6,1,14
|
|
3096
|
+
BRDA:85,7,0,2
|
|
3097
|
+
BRDA:85,7,1,12
|
|
3098
|
+
BRDA:93,8,0,0
|
|
3099
|
+
BRDA:93,8,1,14
|
|
3100
|
+
BRDA:97,9,0,0
|
|
3101
|
+
BRDA:97,9,1,14
|
|
3102
|
+
BRDA:101,10,0,0
|
|
3103
|
+
BRDA:101,10,1,14
|
|
3104
|
+
BRDA:111,11,0,28
|
|
3105
|
+
BRDA:111,11,1,32
|
|
3106
|
+
BRDA:113,12,0,18
|
|
3107
|
+
BRDA:113,12,1,14
|
|
3108
|
+
BRDA:114,13,0,32
|
|
3109
|
+
BRDA:114,13,1,18
|
|
3110
|
+
BRDA:114,13,2,18
|
|
3111
|
+
BRDA:114,13,3,18
|
|
3112
|
+
BRDA:126,14,0,16
|
|
3113
|
+
BRDA:126,14,1,12
|
|
3114
|
+
BRDA:126,15,0,28
|
|
3115
|
+
BRDA:126,15,1,14
|
|
3116
|
+
BRDA:133,16,0,28
|
|
3117
|
+
BRDA:133,16,1,32
|
|
3118
|
+
BRDA:134,17,0,60
|
|
3119
|
+
BRDA:134,17,1,32
|
|
3120
|
+
BRDA:134,17,2,32
|
|
3121
|
+
BRDA:134,17,3,32
|
|
3122
|
+
BRDA:144,18,0,0
|
|
3123
|
+
BRDA:144,18,1,32
|
|
3124
|
+
BRDA:144,19,0,32
|
|
3125
|
+
BRDA:144,19,1,16
|
|
3126
|
+
BRDA:148,20,0,0
|
|
3127
|
+
BRDA:148,20,1,0
|
|
3128
|
+
BRDA:148,21,0,0
|
|
3129
|
+
BRDA:148,21,1,0
|
|
3130
|
+
BRDA:156,22,0,0
|
|
3131
|
+
BRDA:156,22,1,32
|
|
3132
|
+
BRDA:159,23,0,0
|
|
3133
|
+
BRDA:159,23,1,0
|
|
3134
|
+
BRDA:159,24,0,0
|
|
3135
|
+
BRDA:159,24,1,0
|
|
3136
|
+
BRF:54
|
|
3137
|
+
BRH:36
|
|
3141
3138
|
end_of_record
|
|
3142
3139
|
TN:
|
|
3143
3140
|
SF:src/hooks/useMap.ts
|
package/dist/index.esm.js
CHANGED
|
@@ -12220,8 +12220,14 @@ function useLayer(props) {
|
|
|
12220
12220
|
var layerId = useRef(props.layerId || (props.idPrefix ? props.idPrefix : "Layer-") + mapHook.componentId);
|
|
12221
12221
|
var createLayer = useCallback(function () {
|
|
12222
12222
|
var _a, _b;
|
|
12223
|
-
if (
|
|
12223
|
+
if (!mapHook.map)
|
|
12224
12224
|
return;
|
|
12225
|
+
if (mapHook.map.map.getLayer(layerId.current)) {
|
|
12226
|
+
mapHook.map.map.removeLayer(layerId.current);
|
|
12227
|
+
}
|
|
12228
|
+
if (mapHook.map.map.getSource(layerId.current)) {
|
|
12229
|
+
mapHook.map.map.removeSource(layerId.current);
|
|
12230
|
+
}
|
|
12225
12231
|
initializedRef.current = true;
|
|
12226
12232
|
mapHook.map.addLayer(__assign(__assign(__assign({}, props.options), (props.geojson
|
|
12227
12233
|
? {
|
|
@@ -12253,14 +12259,6 @@ function useLayer(props) {
|
|
|
12253
12259
|
if (!mapHook.map)
|
|
12254
12260
|
return;
|
|
12255
12261
|
if (initializedRef.current &&
|
|
12256
|
-
((props.options.type && legalLayerTypes.indexOf(props.options.type) !== -1) ||
|
|
12257
|
-
!props.options.type) &&
|
|
12258
|
-
layerTypeRef.current &&
|
|
12259
|
-
props.options.type !== layerTypeRef.current) {
|
|
12260
|
-
// remove (cleanup) & reinitialize the layer if type has changed
|
|
12261
|
-
cleanup();
|
|
12262
|
-
}
|
|
12263
|
-
else if (initializedRef.current &&
|
|
12264
12262
|
(legalLayerTypes.indexOf(props.options.type) === -1 ||
|
|
12265
12263
|
(legalLayerTypes.indexOf(props.options.type) !== -1 &&
|
|
12266
12264
|
props.options.type === layerTypeRef.current))) {
|
|
@@ -12277,7 +12275,10 @@ function useLayer(props) {
|
|
|
12277
12275
|
}, [props.geojson, mapHook.map, props.options.type]);
|
|
12278
12276
|
useEffect(function () {
|
|
12279
12277
|
var _a, _b, _c, _d, _e;
|
|
12280
|
-
if (!mapHook.map ||
|
|
12278
|
+
if (!mapHook.map ||
|
|
12279
|
+
!((_c = (_b = (_a = mapHook.map) === null || _a === void 0 ? void 0 : _a.map) === null || _b === void 0 ? void 0 : _b.getLayer) === null || _c === void 0 ? void 0 : _c.call(_b, layerId.current)) ||
|
|
12280
|
+
!initializedRef.current ||
|
|
12281
|
+
props.options.type !== layerTypeRef.current)
|
|
12281
12282
|
return;
|
|
12282
12283
|
var key;
|
|
12283
12284
|
var layoutString = JSON.stringify(props.options.layout);
|