@mapcomponents/react-maplibre 0.1.41 → 0.1.44
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 +15 -0
- package/coverage/clover.xml +44 -45
- package/coverage/coverage-final.json +1 -1
- package/coverage/lcov-report/index.html +9 -9
- 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 +9 -9
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +18 -33
- 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 +93 -99
- package/dist/index.esm.js +6 -10
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.ts +1 -1
- package/src/hooks/useLayer.ts +6 -11
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">68.51% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>37/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.54% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>41/55</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -242,12 +242,7 @@
|
|
|
242
242
|
<a name='L177'></a><a href='#L177'>177</a>
|
|
243
243
|
<a name='L178'></a><a href='#L178'>178</a>
|
|
244
244
|
<a name='L179'></a><a href='#L179'>179</a>
|
|
245
|
-
<a name='L180'></a><a href='#L180'>180</a>
|
|
246
|
-
<a name='L181'></a><a href='#L181'>181</a>
|
|
247
|
-
<a name='L182'></a><a href='#L182'>182</a>
|
|
248
|
-
<a name='L183'></a><a href='#L183'>183</a>
|
|
249
|
-
<a name='L184'></a><a href='#L184'>184</a>
|
|
250
|
-
<a name='L185'></a><a href='#L185'>185</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
245
|
+
<a name='L180'></a><a href='#L180'>180</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
251
246
|
<span class="cline-any cline-neutral"> </span>
|
|
252
247
|
<span class="cline-any cline-neutral"> </span>
|
|
253
248
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -311,6 +306,11 @@
|
|
|
311
306
|
<span class="cline-any cline-neutral"> </span>
|
|
312
307
|
<span class="cline-any cline-yes">14x</span>
|
|
313
308
|
<span class="cline-any cline-neutral"> </span>
|
|
309
|
+
<span class="cline-any cline-no"> </span>
|
|
310
|
+
<span class="cline-any cline-neutral"> </span>
|
|
311
|
+
<span class="cline-any cline-neutral"> </span>
|
|
312
|
+
<span class="cline-any cline-yes">14x</span>
|
|
313
|
+
<span class="cline-any cline-neutral"> </span>
|
|
314
314
|
<span class="cline-any cline-neutral"> </span>
|
|
315
315
|
<span class="cline-any cline-neutral"> </span>
|
|
316
316
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -358,15 +358,6 @@
|
|
|
358
358
|
<span class="cline-any cline-neutral"> </span>
|
|
359
359
|
<span class="cline-any cline-neutral"> </span>
|
|
360
360
|
<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
361
|
<span class="cline-any cline-yes">18x</span>
|
|
371
362
|
<span class="cline-any cline-neutral"> </span>
|
|
372
363
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -382,7 +373,6 @@
|
|
|
382
373
|
<span class="cline-any cline-neutral"> </span>
|
|
383
374
|
<span class="cline-any cline-yes">60x</span>
|
|
384
375
|
<span class="cline-any cline-yes">60x</span>
|
|
385
|
-
<span class="cline-any cline-yes">28x</span>
|
|
386
376
|
<span class="cline-any cline-neutral"> </span>
|
|
387
377
|
<span class="cline-any cline-neutral"> </span>
|
|
388
378
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -492,6 +482,11 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
492
482
|
const createLayer = useCallback(() => {
|
|
493
483
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (initializedRef.current || !mapHook.map) <span class="cstat-no" title="statement not covered" >return;</span>
|
|
494
484
|
initializedRef.current = true;
|
|
485
|
+
|
|
486
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (mapHook.map.map.getLayer(layerId.current)) {
|
|
487
|
+
// remove (cleanup) & reinitialize the layer if type has changed
|
|
488
|
+
<span class="cstat-no" title="statement not covered" > cleanup();</span>
|
|
489
|
+
}
|
|
495
490
|
|
|
496
491
|
mapHook.map.addLayer(
|
|
497
492
|
{
|
|
@@ -536,16 +531,7 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
536
531
|
useEffect(() => {
|
|
537
532
|
if (!mapHook.map) return;
|
|
538
533
|
|
|
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 (
|
|
534
|
+
if (
|
|
549
535
|
initializedRef.current &&
|
|
550
536
|
(legalLayerTypes.indexOf(props.options.type) === -1 ||
|
|
551
537
|
(legalLayerTypes.indexOf(props.options.type) !== -1 &&
|
|
@@ -565,8 +551,7 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
565
551
|
}, [props.geojson, mapHook.map, props.options.type]);
|
|
566
552
|
|
|
567
553
|
useEffect(() => {
|
|
568
|
-
if (!mapHook.map || !mapHook.map?.map?.getLayer?.(layerId.current) || !initializedRef.current)
|
|
569
|
-
return;
|
|
554
|
+
if (!mapHook.map || !mapHook.map?.map?.getLayer?.(layerId.current) || !initializedRef.current || props.options.type !== layerTypeRef.current)return;
|
|
570
555
|
|
|
571
556
|
var key;
|
|
572
557
|
|
|
@@ -622,7 +607,7 @@ export default useLayer;
|
|
|
622
607
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
623
608
|
Code coverage generated by
|
|
624
609
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
625
|
-
at Tue May 10 2022
|
|
610
|
+
at Tue May 10 2022 15:12:51 GMT+0000 (Coordinated Universal Time)
|
|
626
611
|
</div>
|
|
627
612
|
<script src="../../prettify.js"></script>
|
|
628
613
|
<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 15:12:51 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 15:12:51 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 15:12:51 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 15:12:51 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 15:12:51 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:108,(anonymous_2)
|
|
3007
|
+
FN:123,(anonymous_3)
|
|
3008
|
+
FN:130,(anonymous_4)
|
|
3009
|
+
FN:159,(anonymous_5)
|
|
3010
|
+
FN:164,(anonymous_6)
|
|
3011
|
+
FN:165,(anonymous_7)
|
|
3012
3012
|
FNF:8
|
|
3013
3013
|
FNH:8
|
|
3014
3014
|
FNDA:60,useLayer
|
|
@@ -3031,52 +3031,51 @@ DA:59,60
|
|
|
3031
3031
|
DA:60,14
|
|
3032
3032
|
DA:61,14
|
|
3033
3033
|
DA:63,14
|
|
3034
|
-
DA:
|
|
3035
|
-
DA:
|
|
3036
|
-
DA:
|
|
3037
|
-
DA:
|
|
3038
|
-
DA:
|
|
3039
|
-
DA:
|
|
3040
|
-
DA:
|
|
3041
|
-
DA:98,14
|
|
3034
|
+
DA:65,0
|
|
3035
|
+
DA:68,14
|
|
3036
|
+
DA:89,14
|
|
3037
|
+
DA:91,14
|
|
3038
|
+
DA:92,0
|
|
3039
|
+
DA:95,14
|
|
3040
|
+
DA:96,0
|
|
3042
3041
|
DA:99,14
|
|
3043
|
-
DA:100,
|
|
3044
|
-
DA:103,
|
|
3045
|
-
DA:104,
|
|
3046
|
-
DA:
|
|
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:
|
|
3042
|
+
DA:100,0
|
|
3043
|
+
DA:103,14
|
|
3044
|
+
DA:104,14
|
|
3045
|
+
DA:105,14
|
|
3046
|
+
DA:108,60
|
|
3047
|
+
DA:109,60
|
|
3048
|
+
DA:111,32
|
|
3049
|
+
DA:117,18
|
|
3050
|
+
DA:120,14
|
|
3051
|
+
DA:123,60
|
|
3052
|
+
DA:124,28
|
|
3053
|
+
DA:127,12
|
|
3054
|
+
DA:130,60
|
|
3055
|
+
DA:131,60
|
|
3056
|
+
DA:135,32
|
|
3057
|
+
DA:136,32
|
|
3058
|
+
DA:137,0
|
|
3059
|
+
DA:139,0
|
|
3060
|
+
DA:140,0
|
|
3061
|
+
DA:141,0
|
|
3060
3062
|
DA:144,0
|
|
3061
|
-
DA:
|
|
3062
|
-
DA:
|
|
3063
|
+
DA:147,32
|
|
3064
|
+
DA:148,32
|
|
3063
3065
|
DA:149,0
|
|
3064
|
-
DA:
|
|
3065
|
-
DA:
|
|
3066
|
-
DA:
|
|
3066
|
+
DA:150,0
|
|
3067
|
+
DA:151,0
|
|
3068
|
+
DA:152,0
|
|
3067
3069
|
DA:155,0
|
|
3068
|
-
DA:
|
|
3069
|
-
DA:
|
|
3070
|
-
DA:
|
|
3070
|
+
DA:159,60
|
|
3071
|
+
DA:160,7
|
|
3072
|
+
DA:161,7
|
|
3071
3073
|
DA:164,60
|
|
3072
|
-
DA:165,
|
|
3074
|
+
DA:165,14
|
|
3073
3075
|
DA:166,7
|
|
3074
|
-
DA:
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
DA:175,60
|
|
3078
|
-
LF:56
|
|
3079
|
-
LH:42
|
|
3076
|
+
DA:170,60
|
|
3077
|
+
LF:55
|
|
3078
|
+
LH:41
|
|
3080
3079
|
BRDA:56,0,0,60
|
|
3081
3080
|
BRDA:56,0,1,20
|
|
3082
3081
|
BRDA:56,1,0,20
|
|
@@ -3085,59 +3084,54 @@ BRDA:60,2,0,0
|
|
|
3085
3084
|
BRDA:60,2,1,14
|
|
3086
3085
|
BRDA:60,3,0,14
|
|
3087
3086
|
BRDA:60,3,1,14
|
|
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
|
|
3087
|
+
BRDA:63,4,0,0
|
|
3088
|
+
BRDA:63,4,1,14
|
|
3089
|
+
BRDA:71,5,0,8
|
|
3090
|
+
BRDA:71,5,1,6
|
|
3091
|
+
BRDA:81,6,0,0
|
|
3092
|
+
BRDA:81,6,1,14
|
|
3093
|
+
BRDA:83,7,0,2
|
|
3094
|
+
BRDA:83,7,1,12
|
|
3095
|
+
BRDA:91,8,0,0
|
|
3096
|
+
BRDA:91,8,1,14
|
|
3097
|
+
BRDA:95,9,0,0
|
|
3098
|
+
BRDA:95,9,1,14
|
|
3099
|
+
BRDA:99,10,0,0
|
|
3100
|
+
BRDA:99,10,1,14
|
|
3101
|
+
BRDA:109,11,0,28
|
|
3102
|
+
BRDA:109,11,1,32
|
|
3103
|
+
BRDA:111,12,0,18
|
|
3104
|
+
BRDA:111,12,1,14
|
|
3105
|
+
BRDA:112,13,0,32
|
|
3106
|
+
BRDA:112,13,1,18
|
|
3107
|
+
BRDA:112,13,2,18
|
|
3108
|
+
BRDA:112,13,3,18
|
|
3109
|
+
BRDA:124,14,0,16
|
|
3110
|
+
BRDA:124,14,1,12
|
|
3111
|
+
BRDA:124,15,0,28
|
|
3112
|
+
BRDA:124,15,1,14
|
|
3113
|
+
BRDA:131,16,0,28
|
|
3114
|
+
BRDA:131,16,1,32
|
|
3115
|
+
BRDA:131,17,0,60
|
|
3116
|
+
BRDA:131,17,1,32
|
|
3117
|
+
BRDA:131,17,2,32
|
|
3118
|
+
BRDA:131,17,3,32
|
|
3119
|
+
BRDA:136,18,0,0
|
|
3120
|
+
BRDA:136,18,1,32
|
|
3121
|
+
BRDA:136,19,0,32
|
|
3122
|
+
BRDA:136,19,1,16
|
|
3123
|
+
BRDA:140,20,0,0
|
|
3124
|
+
BRDA:140,20,1,0
|
|
3125
|
+
BRDA:140,21,0,0
|
|
3126
|
+
BRDA:140,21,1,0
|
|
3127
|
+
BRDA:148,22,0,0
|
|
3128
|
+
BRDA:148,22,1,32
|
|
3129
|
+
BRDA:151,23,0,0
|
|
3130
|
+
BRDA:151,23,1,0
|
|
3131
|
+
BRDA:151,24,0,0
|
|
3132
|
+
BRDA:151,24,1,0
|
|
3133
|
+
BRF:54
|
|
3134
|
+
BRH:37
|
|
3141
3135
|
end_of_record
|
|
3142
3136
|
TN:
|
|
3143
3137
|
SF:src/hooks/useMap.ts
|
package/dist/index.esm.js
CHANGED
|
@@ -12223,6 +12223,10 @@ function useLayer(props) {
|
|
|
12223
12223
|
if (initializedRef.current || !mapHook.map)
|
|
12224
12224
|
return;
|
|
12225
12225
|
initializedRef.current = true;
|
|
12226
|
+
if (mapHook.map.map.getLayer(layerId.current)) {
|
|
12227
|
+
// remove (cleanup) & reinitialize the layer if type has changed
|
|
12228
|
+
cleanup();
|
|
12229
|
+
}
|
|
12226
12230
|
mapHook.map.addLayer(__assign(__assign(__assign({}, props.options), (props.geojson
|
|
12227
12231
|
? {
|
|
12228
12232
|
source: {
|
|
@@ -12253,14 +12257,6 @@ function useLayer(props) {
|
|
|
12253
12257
|
if (!mapHook.map)
|
|
12254
12258
|
return;
|
|
12255
12259
|
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
12260
|
(legalLayerTypes.indexOf(props.options.type) === -1 ||
|
|
12265
12261
|
(legalLayerTypes.indexOf(props.options.type) !== -1 &&
|
|
12266
12262
|
props.options.type === layerTypeRef.current))) {
|
|
@@ -12277,7 +12273,7 @@ function useLayer(props) {
|
|
|
12277
12273
|
}, [props.geojson, mapHook.map, props.options.type]);
|
|
12278
12274
|
useEffect(function () {
|
|
12279
12275
|
var _a, _b, _c, _d, _e;
|
|
12280
|
-
if (!mapHook.map || !((_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)) || !initializedRef.current)
|
|
12276
|
+
if (!mapHook.map || !((_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)) || !initializedRef.current || props.options.type !== layerTypeRef.current)
|
|
12281
12277
|
return;
|
|
12282
12278
|
var key;
|
|
12283
12279
|
var layoutString = JSON.stringify(props.options.layout);
|
|
@@ -12378,7 +12374,7 @@ var getDefaultPaintPropsByType = function (type, defaultPaintOverrides) {
|
|
|
12378
12374
|
return defaultPaintOverrides.circle;
|
|
12379
12375
|
}
|
|
12380
12376
|
return {
|
|
12381
|
-
"circle-color": "rgba(10,240,256)",
|
|
12377
|
+
"circle-color": "rgba(10,240,256,0.8)",
|
|
12382
12378
|
"circle-stroke-color": "#fff",
|
|
12383
12379
|
"circle-stroke-width": 2,
|
|
12384
12380
|
};
|