@mapcomponents/react-maplibre 0.1.37 → 0.1.38
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/.storybook/main.js +1 -0
- package/coverage/clover.xml +435 -351
- package/coverage/coverage-final.json +29 -26
- package/coverage/lcov-report/index.html +74 -59
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +75 -27
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +13 -13
- package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +9 -9
- package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +11 -11
- package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +3 -6
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +3 -3
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +3 -3
- package/coverage/lcov-report/src/components/MlFollowGps/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +3 -3
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +8 -8
- package/coverage/lcov-report/src/components/MlGPXViewer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +2 -2
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +2 -2
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +2 -2
- package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +15 -27
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +18 -18
- package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +13 -28
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +19 -19
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +2 -2
- 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 +9 -9
- package/coverage/lcov-report/src/components/MlMarker/index.html +11 -11
- package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +6 -6
- package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +7 -7
- package/coverage/lcov-report/src/components/MlNavigationTools/index.html +11 -11
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +3 -3
- 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 +2 -2
- package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +9 -36
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +2 -2
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +3 -3
- 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 +3 -3
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +2 -2
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +5 -5
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +3 -6
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +1 -1
- package/coverage/lcov-report/src/contexts/MapContext.tsx.html +358 -0
- package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +103 -0
- package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +277 -0
- package/coverage/lcov-report/src/contexts/index.html +146 -0
- package/coverage/lcov-report/src/hooks/index.html +11 -11
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +15 -126
- package/coverage/lcov-report/src/hooks/useMap.ts.html +13 -61
- package/coverage/lcov-report/src/hooks/useMapState.ts.html +6 -6
- package/coverage/lcov-report/src/hooks/useWms.js.html +7 -7
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +15 -3
- package/coverage/lcov.info +790 -615
- package/dist/index.esm.js +12092 -37213
- package/dist/index.esm.js.map +1 -1
- package/docs-build/{0.fd1aa3ea21956d993519.manager.bundle.js → 0.20735a16c2ad9677fe7d.manager.bundle.js} +1 -1
- package/docs-build/{0.d0c23b79.iframe.bundle.js → 0.93d0ce3d.iframe.bundle.js} +2 -2
- package/docs-build/0.93d0ce3d.iframe.bundle.js.map +1 -0
- package/docs-build/{1.34075652.iframe.bundle.js → 1.2b1ae3fa.iframe.bundle.js} +2 -2
- package/docs-build/1.2b1ae3fa.iframe.bundle.js.map +1 -0
- package/docs-build/{16.ca488dae.iframe.bundle.js → 16.2c8135a1.iframe.bundle.js} +2 -2
- package/docs-build/16.2c8135a1.iframe.bundle.js.map +1 -0
- package/docs-build/{17.e40eac7f.iframe.bundle.js → 17.9a16865a.iframe.bundle.js} +2 -2
- package/docs-build/17.9a16865a.iframe.bundle.js.map +1 -0
- package/docs-build/{18.62af0912.iframe.bundle.js → 18.4c47f37e.iframe.bundle.js} +2 -2
- package/docs-build/18.4c47f37e.iframe.bundle.js.map +1 -0
- package/docs-build/{19.0a217189.iframe.bundle.js → 19.cdf25e28.iframe.bundle.js} +2 -2
- package/docs-build/19.cdf25e28.iframe.bundle.js.map +1 -0
- package/docs-build/{2.f15ae19a.iframe.bundle.js → 2.4518b817.iframe.bundle.js} +2 -2
- package/docs-build/2.4518b817.iframe.bundle.js.map +1 -0
- package/docs-build/{4.f741dafe1833630ec8bf.manager.bundle.js → 4.8ac31bba1926f4f011b0.manager.bundle.js} +2 -2
- package/docs-build/{4.f741dafe1833630ec8bf.manager.bundle.js.LICENSE.txt → 4.8ac31bba1926f4f011b0.manager.bundle.js.LICENSE.txt} +0 -0
- package/docs-build/{5.d4de191e7daeefb036ca.manager.bundle.js → 5.daf044a6c0f55d839078.manager.bundle.js} +1 -1
- package/docs-build/{6.2b178c5444648ee5c0fa.manager.bundle.js → 6.99fba2cf6af0473f8209.manager.bundle.js} +2 -2
- package/docs-build/{6.2b178c5444648ee5c0fa.manager.bundle.js.LICENSE.txt → 6.99fba2cf6af0473f8209.manager.bundle.js.LICENSE.txt} +0 -0
- package/docs-build/{7.7c16aea8ec7ea6e91994.manager.bundle.js → 7.b6a48b90f61cb575c2e4.manager.bundle.js} +1 -1
- package/docs-build/{8.52fa838fdf937b29676a.manager.bundle.js → 8.50518a5391398d9d5812.manager.bundle.js} +1 -1
- package/docs-build/assets/3D/godzilla_simple.glb +0 -0
- package/docs-build/catalogue/mc_meta.json +1 -1
- package/docs-build/iframe.html +1 -1
- package/docs-build/index.html +1 -1
- package/docs-build/{main.8a7ec710ea1c16b5e13f.manager.bundle.js → main.ef9704b1252e8efa56a0.manager.bundle.js} +1 -1
- package/docs-build/main~24120820.e0a66582.iframe.bundle.js +2 -0
- package/docs-build/main~24120820.e0a66582.iframe.bundle.js.map +1 -0
- package/docs-build/{runtime~main.67aa1de2d72f40a81164.manager.bundle.js → runtime~main.6e6ed7dc9ea4785ef286.manager.bundle.js} +1 -1
- package/docs-build/stories.json +416 -168
- package/docs-build/vendors~main.4b570b3072ba06ee44b5.manager.bundle.js +2 -0
- package/docs-build/{vendors~main.351900838c49e9200954.manager.bundle.js.LICENSE.txt → vendors~main.4b570b3072ba06ee44b5.manager.bundle.js.LICENSE.txt} +27 -24
- package/docs-build/{vendors~main~0ad7406a.a6abfed7.iframe.bundle.js → vendors~main~0ad7406a.22b96f8e.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~0ad7406a.22b96f8e.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~0f485567.1d7a15b7.iframe.bundle.js → vendors~main~0f485567.df27e62a.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~0f485567.df27e62a.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~41a6ab2c.525ecc56.iframe.bundle.js → vendors~main~41a6ab2c.7f3a1ced.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~41a6ab2c.7f3a1ced.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~73914085.227c6747.iframe.bundle.js → vendors~main~73914085.3d4f5bbf.iframe.bundle.js} +4 -4
- package/docs-build/{vendors~main~73914085.227c6747.iframe.bundle.js.map → vendors~main~73914085.3d4f5bbf.iframe.bundle.js.map} +1 -1
- package/docs-build/{vendors~main~9c5b28f6.f02cc741.iframe.bundle.js → vendors~main~9c5b28f6.f8614bdc.iframe.bundle.js} +3 -3
- package/docs-build/vendors~main~9c5b28f6.f8614bdc.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~b5906859.4083ac60.iframe.bundle.js → vendors~main~b5906859.b606e812.iframe.bundle.js} +3 -3
- package/docs-build/vendors~main~b5906859.b606e812.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~b9cf3951.a6200a51.iframe.bundle.js +63 -0
- package/docs-build/vendors~main~b9cf3951.a6200a51.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~d939e436.92c27fbf.iframe.bundle.js → vendors~main~d939e436.aa5d1533.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~d939e436.aa5d1533.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~dab50aa4.b0d58038.iframe.bundle.js → vendors~main~dab50aa4.277284e0.iframe.bundle.js} +4 -4
- package/docs-build/{vendors~main~dab50aa4.b0d58038.iframe.bundle.js.map → vendors~main~dab50aa4.277284e0.iframe.bundle.js.map} +1 -1
- package/package.json +6 -4
- package/rollup.config.js +5 -6
- package/src/components/MapLibreMap/MapLibreMap.stories.js +1 -1
- package/src/components/MapLibreMap/MapLibreMap.test.js +1 -1
- package/src/components/MapLibreMap/MapLibreMap.tsx +32 -16
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.test.js +1 -1
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +2 -2
- package/src/components/MlBasicComponent.js +4 -1
- package/src/components/MlFeatureEditor/MlFeatureEditor.test.js +1 -1
- package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +0 -1
- package/src/components/MlFollowGps/MlFollowGps.test.js +1 -1
- package/src/components/MlLayer/MlLayer.test.js +1 -1
- package/src/components/MlLayerMagnify/MlLayerMagnify.test.js +1 -1
- package/src/components/MlLayerMagnify/MlLayerMagnify.tsx +3 -7
- package/src/components/MlLayerSwipe/MlLayerSwipe.test.js +1 -1
- package/src/components/MlLayerSwipe/MlLayerSwipe.tsx +2 -7
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.js +1 -1
- package/src/components/MlNavigationCompass/MlNavigationCompass.test.js +1 -1
- package/src/components/MlShareMapState/MlShareMapState.js +1 -1
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js +4 -13
- package/src/components/MlThreeJsLayer/MlThreeJsLayer.js +1 -1
- package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.js +1 -1
- package/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js +1 -1
- package/src/components/MlWmsLoader/MlWmsLoader.tsx +1 -2
- package/src/contexts/MapComponentsProvider.test.js +260 -0
- package/src/contexts/MapContext.tsx +92 -0
- package/src/contexts/SimpleDataContext.js +6 -0
- package/src/contexts/SimpleDataProvider.js +64 -0
- package/src/contexts/SimpleDataProvider.test.js +68 -0
- package/src/custom.d.tsx +1 -1
- package/src/decorators/MapContextDecorator.js +1 -1
- package/src/decorators/MultiMapContextDecorator.js +1 -1
- package/src/hooks/useLayer.ts +12 -49
- package/src/hooks/useMap.ts +9 -26
- package/src/hooks/useMapState.ts +3 -3
- package/src/index.ts +5 -1
- package/src/ui_components/LoadingOverlayContext.js +1 -1
- package/src/util/layerRemovalTest.js +1 -1
- package/src/util/sourceRemovalTest.js +1 -1
- package/docs-build/0.d0c23b79.iframe.bundle.js.map +0 -1
- package/docs-build/1.34075652.iframe.bundle.js.map +0 -1
- package/docs-build/16.ca488dae.iframe.bundle.js.map +0 -1
- package/docs-build/17.e40eac7f.iframe.bundle.js.map +0 -1
- package/docs-build/18.62af0912.iframe.bundle.js.map +0 -1
- package/docs-build/19.0a217189.iframe.bundle.js.map +0 -1
- package/docs-build/2.f15ae19a.iframe.bundle.js.map +0 -1
- package/docs-build/main~24120820.ba6665a8.iframe.bundle.js +0 -2
- package/docs-build/main~24120820.ba6665a8.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main.351900838c49e9200954.manager.bundle.js +0 -2
- package/docs-build/vendors~main~0ad7406a.a6abfed7.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~0f485567.1d7a15b7.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~41a6ab2c.525ecc56.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~9c5b28f6.f02cc741.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b5906859.4083ac60.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b9cf3951.45da142d.iframe.bundle.js +0 -68
- package/docs-build/vendors~main~b9cf3951.45da142d.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~d939e436.92c27fbf.iframe.bundle.js.map +0 -1
- package/public/stories.json +0 -331
|
@@ -247,44 +247,7 @@
|
|
|
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>
|
|
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>
|
|
254
|
-
<a name='L189'></a><a href='#L189'>189</a>
|
|
255
|
-
<a name='L190'></a><a href='#L190'>190</a>
|
|
256
|
-
<a name='L191'></a><a href='#L191'>191</a>
|
|
257
|
-
<a name='L192'></a><a href='#L192'>192</a>
|
|
258
|
-
<a name='L193'></a><a href='#L193'>193</a>
|
|
259
|
-
<a name='L194'></a><a href='#L194'>194</a>
|
|
260
|
-
<a name='L195'></a><a href='#L195'>195</a>
|
|
261
|
-
<a name='L196'></a><a href='#L196'>196</a>
|
|
262
|
-
<a name='L197'></a><a href='#L197'>197</a>
|
|
263
|
-
<a name='L198'></a><a href='#L198'>198</a>
|
|
264
|
-
<a name='L199'></a><a href='#L199'>199</a>
|
|
265
|
-
<a name='L200'></a><a href='#L200'>200</a>
|
|
266
|
-
<a name='L201'></a><a href='#L201'>201</a>
|
|
267
|
-
<a name='L202'></a><a href='#L202'>202</a>
|
|
268
|
-
<a name='L203'></a><a href='#L203'>203</a>
|
|
269
|
-
<a name='L204'></a><a href='#L204'>204</a>
|
|
270
|
-
<a name='L205'></a><a href='#L205'>205</a>
|
|
271
|
-
<a name='L206'></a><a href='#L206'>206</a>
|
|
272
|
-
<a name='L207'></a><a href='#L207'>207</a>
|
|
273
|
-
<a name='L208'></a><a href='#L208'>208</a>
|
|
274
|
-
<a name='L209'></a><a href='#L209'>209</a>
|
|
275
|
-
<a name='L210'></a><a href='#L210'>210</a>
|
|
276
|
-
<a name='L211'></a><a href='#L211'>211</a>
|
|
277
|
-
<a name='L212'></a><a href='#L212'>212</a>
|
|
278
|
-
<a name='L213'></a><a href='#L213'>213</a>
|
|
279
|
-
<a name='L214'></a><a href='#L214'>214</a>
|
|
280
|
-
<a name='L215'></a><a href='#L215'>215</a>
|
|
281
|
-
<a name='L216'></a><a href='#L216'>216</a>
|
|
282
|
-
<a name='L217'></a><a href='#L217'>217</a>
|
|
283
|
-
<a name='L218'></a><a href='#L218'>218</a>
|
|
284
|
-
<a name='L219'></a><a href='#L219'>219</a>
|
|
285
|
-
<a name='L220'></a><a href='#L220'>220</a>
|
|
286
|
-
<a name='L221'></a><a href='#L221'>221</a>
|
|
287
|
-
<a name='L222'></a><a href='#L222'>222</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
250
|
+
<a name='L185'></a><a href='#L185'>185</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
288
251
|
<span class="cline-any cline-neutral"> </span>
|
|
289
252
|
<span class="cline-any cline-neutral"> </span>
|
|
290
253
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -313,7 +276,7 @@
|
|
|
313
276
|
<span class="cline-any cline-neutral"> </span>
|
|
314
277
|
<span class="cline-any cline-neutral"> </span>
|
|
315
278
|
<span class="cline-any cline-neutral"> </span>
|
|
316
|
-
<span class="cline-any cline-yes">
|
|
279
|
+
<span class="cline-any cline-yes">12x</span>
|
|
317
280
|
<span class="cline-any cline-neutral"> </span>
|
|
318
281
|
<span class="cline-any cline-neutral"> </span>
|
|
319
282
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -342,7 +305,6 @@
|
|
|
342
305
|
<span class="cline-any cline-neutral"> </span>
|
|
343
306
|
<span class="cline-any cline-neutral"> </span>
|
|
344
307
|
<span class="cline-any cline-neutral"> </span>
|
|
345
|
-
<span class="cline-any cline-neutral"> </span>
|
|
346
308
|
<span class="cline-any cline-yes">60x</span>
|
|
347
309
|
<span class="cline-any cline-yes">14x</span>
|
|
348
310
|
<span class="cline-any cline-yes">14x</span>
|
|
@@ -374,29 +336,14 @@
|
|
|
374
336
|
<span class="cline-any cline-no"> </span>
|
|
375
337
|
<span class="cline-any cline-neutral"> </span>
|
|
376
338
|
<span class="cline-any cline-neutral"> </span>
|
|
377
|
-
<span class="cline-any cline-neutral"> </span>
|
|
378
|
-
<span class="cline-any cline-neutral"> </span>
|
|
379
|
-
<span class="cline-any cline-neutral"> </span>
|
|
380
|
-
<span class="cline-any cline-neutral"> </span>
|
|
381
|
-
<span class="cline-any cline-neutral"> </span>
|
|
382
339
|
<span class="cline-any cline-yes">14x</span>
|
|
383
340
|
<span class="cline-any cline-no"> </span>
|
|
384
341
|
<span class="cline-any cline-neutral"> </span>
|
|
385
342
|
<span class="cline-any cline-neutral"> </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>
|
|
391
343
|
<span class="cline-any cline-yes">14x</span>
|
|
392
344
|
<span class="cline-any cline-no"> </span>
|
|
393
345
|
<span class="cline-any cline-neutral"> </span>
|
|
394
346
|
<span class="cline-any cline-neutral"> </span>
|
|
395
|
-
<span class="cline-any cline-neutral"> </span>
|
|
396
|
-
<span class="cline-any cline-neutral"> </span>
|
|
397
|
-
<span class="cline-any cline-neutral"> </span>
|
|
398
|
-
<span class="cline-any cline-neutral"> </span>
|
|
399
|
-
<span class="cline-any cline-neutral"> </span>
|
|
400
347
|
<span class="cline-any cline-yes">14x</span>
|
|
401
348
|
<span class="cline-any cline-yes">14x</span>
|
|
402
349
|
<span class="cline-any cline-yes">14x</span>
|
|
@@ -427,9 +374,6 @@
|
|
|
427
374
|
<span class="cline-any cline-neutral"> </span>
|
|
428
375
|
<span class="cline-any cline-yes">60x</span>
|
|
429
376
|
<span class="cline-any cline-yes">28x</span>
|
|
430
|
-
<span class="cline-any cline-neutral"> </span>
|
|
431
|
-
<span class="cline-any cline-neutral"> </span>
|
|
432
|
-
<span class="cline-any cline-neutral"> </span>
|
|
433
377
|
<span class="cline-any cline-yes">16x</span>
|
|
434
378
|
<span class="cline-any cline-neutral"> </span>
|
|
435
379
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -438,10 +382,6 @@
|
|
|
438
382
|
<span class="cline-any cline-neutral"> </span>
|
|
439
383
|
<span class="cline-any cline-yes">60x</span>
|
|
440
384
|
<span class="cline-any cline-yes">60x</span>
|
|
441
|
-
<span class="cline-any cline-neutral"> </span>
|
|
442
|
-
<span class="cline-any cline-neutral"> </span>
|
|
443
|
-
<span class="cline-any cline-neutral"> </span>
|
|
444
|
-
<span class="cline-any cline-neutral"> </span>
|
|
445
385
|
<span class="cline-any cline-yes">28x</span>
|
|
446
386
|
<span class="cline-any cline-neutral"> </span>
|
|
447
387
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -452,16 +392,9 @@
|
|
|
452
392
|
<span class="cline-any cline-neutral"> </span>
|
|
453
393
|
<span class="cline-any cline-no"> </span>
|
|
454
394
|
<span class="cline-any cline-no"> </span>
|
|
455
|
-
<span class="cline-any cline-neutral"> </span>
|
|
456
|
-
<span class="cline-any cline-neutral"> </span>
|
|
457
|
-
<span class="cline-any cline-neutral"> </span>
|
|
458
395
|
<span class="cline-any cline-no"> </span>
|
|
459
396
|
<span class="cline-any cline-neutral"> </span>
|
|
460
397
|
<span class="cline-any cline-neutral"> </span>
|
|
461
|
-
<span class="cline-any cline-neutral"> </span>
|
|
462
|
-
<span class="cline-any cline-neutral"> </span>
|
|
463
|
-
<span class="cline-any cline-neutral"> </span>
|
|
464
|
-
<span class="cline-any cline-neutral"> </span>
|
|
465
398
|
<span class="cline-any cline-no"> </span>
|
|
466
399
|
<span class="cline-any cline-neutral"> </span>
|
|
467
400
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -470,16 +403,9 @@
|
|
|
470
403
|
<span class="cline-any cline-no"> </span>
|
|
471
404
|
<span class="cline-any cline-no"> </span>
|
|
472
405
|
<span class="cline-any cline-no"> </span>
|
|
473
|
-
<span class="cline-any cline-neutral"> </span>
|
|
474
|
-
<span class="cline-any cline-neutral"> </span>
|
|
475
|
-
<span class="cline-any cline-neutral"> </span>
|
|
476
406
|
<span class="cline-any cline-no"> </span>
|
|
477
407
|
<span class="cline-any cline-neutral"> </span>
|
|
478
408
|
<span class="cline-any cline-neutral"> </span>
|
|
479
|
-
<span class="cline-any cline-neutral"> </span>
|
|
480
|
-
<span class="cline-any cline-neutral"> </span>
|
|
481
|
-
<span class="cline-any cline-neutral"> </span>
|
|
482
|
-
<span class="cline-any cline-neutral"> </span>
|
|
483
409
|
<span class="cline-any cline-no"> </span>
|
|
484
410
|
<span class="cline-any cline-neutral"> </span>
|
|
485
411
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -560,8 +486,7 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
560
486
|
|
|
561
487
|
const initializedRef = useRef<boolean>(false);
|
|
562
488
|
const layerId = useRef(
|
|
563
|
-
props.layerId ||
|
|
564
|
-
(props.idPrefix ? props.idPrefix : <span class="branch-1 cbranch-no" title="branch not covered" >"Layer-")</span> + mapHook.componentId
|
|
489
|
+
props.layerId || (props.idPrefix ? props.idPrefix : <span class="branch-1 cbranch-no" title="branch not covered" >"Layer-")</span> + mapHook.componentId
|
|
565
490
|
);
|
|
566
491
|
|
|
567
492
|
const createLayer = useCallback(() => {
|
|
@@ -592,30 +517,15 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
592
517
|
setLayer(mapHook.map.map.getLayer(layerId.current));
|
|
593
518
|
|
|
594
519
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof props.onHover !== "undefined") {
|
|
595
|
-
<span class="cstat-no" title="statement not covered" > mapHook.map.on(
|
|
596
|
-
"mousemove",
|
|
597
|
-
layerId.current,
|
|
598
|
-
props.onHover,
|
|
599
|
-
mapHook.componentId
|
|
600
|
-
);
|
|
520
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.on("mousemove", layerId.current, props.onHover, mapHook.componentId);</span>
|
|
601
521
|
}
|
|
602
522
|
|
|
603
523
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof props.onClick !== "undefined") {
|
|
604
|
-
<span class="cstat-no" title="statement not covered" > mapHook.map.on(
|
|
605
|
-
"click",
|
|
606
|
-
layerId.current,
|
|
607
|
-
props.onClick,
|
|
608
|
-
mapHook.componentId
|
|
609
|
-
);
|
|
524
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.on("click", layerId.current, props.onClick, mapHook.componentId);</span>
|
|
610
525
|
}
|
|
611
526
|
|
|
612
527
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof props.onLeave !== "undefined") {
|
|
613
|
-
<span class="cstat-no" title="statement not covered" > mapHook.map.on(
|
|
614
|
-
"mouseleave",
|
|
615
|
-
layerId.current,
|
|
616
|
-
props.onLeave,
|
|
617
|
-
mapHook.componentId
|
|
618
|
-
);
|
|
528
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.on("mouseleave", layerId.current, props.onLeave, mapHook.componentId);</span>
|
|
619
529
|
}
|
|
620
530
|
|
|
621
531
|
layerPaintConfRef.current = JSON.stringify(props.options?.paint);
|
|
@@ -647,22 +557,15 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
647
557
|
}, [mapHook.map, props.options, createLayer]);
|
|
648
558
|
|
|
649
559
|
useEffect(() => {
|
|
650
|
-
if (
|
|
651
|
-
!initializedRef.current ||
|
|
652
|
-
!mapHook?.map?.map.getSource(layerId.current)
|
|
653
|
-
)
|
|
560
|
+
if (!initializedRef.current || !mapHook.map?.map?.getSource(layerId.current))
|
|
654
561
|
return;
|
|
655
562
|
|
|
656
|
-
|
|
657
|
-
mapHook.map.map.getSource(layerId.current)
|
|
563
|
+
//@ts-ignore setData only exists on GeoJsonSource
|
|
564
|
+
mapHook.map.map.getSource(layerId.current)?.setData?.(props.geojson);
|
|
658
565
|
}, [props.geojson, mapHook.map, props.options.type]);
|
|
659
566
|
|
|
660
567
|
useEffect(() => {
|
|
661
|
-
if (
|
|
662
|
-
!mapHook.map ||
|
|
663
|
-
!mapHook.map?.map?.getLayer?.(layerId.current) ||
|
|
664
|
-
!initializedRef.current
|
|
665
|
-
)
|
|
568
|
+
if (!mapHook.map || !mapHook.map?.map?.getLayer?.(layerId.current) || !initializedRef.current)
|
|
666
569
|
return;
|
|
667
570
|
|
|
668
571
|
var key;
|
|
@@ -672,15 +575,8 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
672
575
|
let oldLayout = <span class="cstat-no" title="statement not covered" >JSON.parse(layerLayoutConfRef.current);</span>
|
|
673
576
|
|
|
674
577
|
<span class="cstat-no" title="statement not covered" > for (key in props.options.layout) {</span>
|
|
675
|
-
<span class="cstat-no" title="statement not covered" > if (</span>
|
|
676
|
-
props.options.layout
|
|
677
|
-
props.options.layout[key] !== oldLayout[key]
|
|
678
|
-
) {
|
|
679
|
-
<span class="cstat-no" title="statement not covered" > mapHook.map.map.setLayoutProperty(</span>
|
|
680
|
-
layerId.current,
|
|
681
|
-
key,
|
|
682
|
-
props.options.layout[key]
|
|
683
|
-
);
|
|
578
|
+
<span class="cstat-no" title="statement not covered" > if (props.options.layout?.[key] && props.options.layout[key] !== oldLayout[key]) {</span>
|
|
579
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.map.setLayoutProperty(layerId.current, key, props.options.layout[key]);</span>
|
|
684
580
|
}
|
|
685
581
|
}
|
|
686
582
|
<span class="cstat-no" title="statement not covered" > layerLayoutConfRef.current = layoutString;</span>
|
|
@@ -690,15 +586,8 @@ function useLayer(props: useLayerProps): useLayerType {
|
|
|
690
586
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (paintString !== layerPaintConfRef.current) {
|
|
691
587
|
let oldPaint = <span class="cstat-no" title="statement not covered" >JSON.parse(layerPaintConfRef.current);</span>
|
|
692
588
|
<span class="cstat-no" title="statement not covered" > for (key in props.options.paint) {</span>
|
|
693
|
-
<span class="cstat-no" title="statement not covered" > if (</span>
|
|
694
|
-
props.options.paint
|
|
695
|
-
props.options.paint[key] !== oldPaint[key]
|
|
696
|
-
) {
|
|
697
|
-
<span class="cstat-no" title="statement not covered" > mapHook.map.map.setPaintProperty(</span>
|
|
698
|
-
layerId.current,
|
|
699
|
-
key,
|
|
700
|
-
props.options.paint[key]
|
|
701
|
-
);
|
|
589
|
+
<span class="cstat-no" title="statement not covered" > if (props.options.paint?.[key] && props.options.paint[key] !== oldPaint[key]) {</span>
|
|
590
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.map.setPaintProperty(layerId.current, key, props.options.paint[key]);</span>
|
|
702
591
|
}
|
|
703
592
|
}
|
|
704
593
|
<span class="cstat-no" title="statement not covered" > layerPaintConfRef.current = paintString;</span>
|
|
@@ -733,7 +622,7 @@ export default useLayer;
|
|
|
733
622
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
734
623
|
Code coverage generated by
|
|
735
624
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
736
|
-
at
|
|
625
|
+
at Thu Apr 21 2022 11:37:11 GMT+0000 (Coordinated Universal Time)
|
|
737
626
|
</div>
|
|
738
627
|
<script src="../../prettify.js"></script>
|
|
739
628
|
<script>
|
|
@@ -151,32 +151,7 @@
|
|
|
151
151
|
<a name='L86'></a><a href='#L86'>86</a>
|
|
152
152
|
<a name='L87'></a><a href='#L87'>87</a>
|
|
153
153
|
<a name='L88'></a><a href='#L88'>88</a>
|
|
154
|
-
<a name='L89'></a><a href='#L89'>89</a>
|
|
155
|
-
<a name='L90'></a><a href='#L90'>90</a>
|
|
156
|
-
<a name='L91'></a><a href='#L91'>91</a>
|
|
157
|
-
<a name='L92'></a><a href='#L92'>92</a>
|
|
158
|
-
<a name='L93'></a><a href='#L93'>93</a>
|
|
159
|
-
<a name='L94'></a><a href='#L94'>94</a>
|
|
160
|
-
<a name='L95'></a><a href='#L95'>95</a>
|
|
161
|
-
<a name='L96'></a><a href='#L96'>96</a>
|
|
162
|
-
<a name='L97'></a><a href='#L97'>97</a>
|
|
163
|
-
<a name='L98'></a><a href='#L98'>98</a>
|
|
164
|
-
<a name='L99'></a><a href='#L99'>99</a>
|
|
165
|
-
<a name='L100'></a><a href='#L100'>100</a>
|
|
166
|
-
<a name='L101'></a><a href='#L101'>101</a>
|
|
167
|
-
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
|
-
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
|
-
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
|
-
<a name='L105'></a><a href='#L105'>105</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
171
|
-
<span class="cline-any cline-neutral"> </span>
|
|
172
|
-
<span class="cline-any cline-neutral"> </span>
|
|
173
|
-
<span class="cline-any cline-neutral"> </span>
|
|
174
|
-
<span class="cline-any cline-neutral"> </span>
|
|
175
|
-
<span class="cline-any cline-neutral"> </span>
|
|
176
|
-
<span class="cline-any cline-neutral"> </span>
|
|
177
|
-
<span class="cline-any cline-neutral"> </span>
|
|
178
|
-
<span class="cline-any cline-neutral"> </span>
|
|
179
|
-
<span class="cline-any cline-neutral"> </span>
|
|
154
|
+
<a name='L89'></a><a href='#L89'>89</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
180
155
|
<span class="cline-any cline-neutral"> </span>
|
|
181
156
|
<span class="cline-any cline-neutral"> </span>
|
|
182
157
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -208,7 +183,6 @@
|
|
|
208
183
|
<span class="cline-any cline-neutral"> </span>
|
|
209
184
|
<span class="cline-any cline-neutral"> </span>
|
|
210
185
|
<span class="cline-any cline-yes">169x</span>
|
|
211
|
-
<span class="cline-any cline-neutral"> </span>
|
|
212
186
|
<span class="cline-any cline-yes">169x</span>
|
|
213
187
|
<span class="cline-any cline-neutral"> </span>
|
|
214
188
|
<span class="cline-any cline-yes">169x</span>
|
|
@@ -249,17 +223,10 @@
|
|
|
249
223
|
<span class="cline-any cline-neutral"> </span>
|
|
250
224
|
<span class="cline-any cline-yes">48x</span>
|
|
251
225
|
<span class="cline-any cline-yes">48x</span>
|
|
252
|
-
<span class="cline-any cline-neutral"> </span>
|
|
253
226
|
<span class="cline-any cline-yes">48x</span>
|
|
254
227
|
<span class="cline-any cline-yes">48x</span>
|
|
255
228
|
<span class="cline-any cline-neutral"> </span>
|
|
256
229
|
<span class="cline-any cline-neutral"> </span>
|
|
257
|
-
<span class="cline-any cline-neutral"> </span>
|
|
258
|
-
<span class="cline-any cline-neutral"> </span>
|
|
259
|
-
<span class="cline-any cline-neutral"> </span>
|
|
260
|
-
<span class="cline-any cline-neutral"> </span>
|
|
261
|
-
<span class="cline-any cline-neutral"> </span>
|
|
262
|
-
<span class="cline-any cline-neutral"> </span>
|
|
263
230
|
<span class="cline-any cline-yes">169x</span>
|
|
264
231
|
<span class="cline-any cline-neutral"> </span>
|
|
265
232
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -271,33 +238,25 @@
|
|
|
271
238
|
<span class="cline-any cline-neutral"> </span>
|
|
272
239
|
<span class="cline-any cline-neutral"> </span>
|
|
273
240
|
<span class="cline-any cline-neutral"> </span>
|
|
274
|
-
<span class="cline-any cline-neutral"> </span
|
|
275
|
-
|
|
276
|
-
useState,
|
|
277
|
-
useEffect,
|
|
278
|
-
useRef,
|
|
279
|
-
MutableRefObject,
|
|
280
|
-
} from "react";
|
|
241
|
+
<span class="cline-any cline-neutral"> </span>
|
|
242
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useContext, useState, useEffect, useRef, MutableRefObject } from "react";
|
|
281
243
|
import { v4 as uuidv4 } from "uuid";
|
|
282
|
-
|
|
283
|
-
import { MapContext } from "@mapcomponents/react-core";
|
|
244
|
+
import MapContext from "../contexts/MapContext";
|
|
284
245
|
import useMapState from "./useMapState";
|
|
285
|
-
import MapLibreGlWrapper, {
|
|
286
|
-
LayerState,
|
|
287
|
-
} from "../components/MapLibreMap/lib/MapLibreGlWrapper";
|
|
246
|
+
import MapLibreGlWrapper, { LayerState } from "../components/MapLibreMap/lib/MapLibreGlWrapper";
|
|
288
247
|
|
|
289
248
|
type useMapType = {
|
|
290
249
|
map: MapLibreGlWrapper | undefined;
|
|
291
250
|
mapIsReady: boolean;
|
|
292
251
|
componentId: string;
|
|
293
252
|
layers: (LayerState | undefined)[];
|
|
294
|
-
cleanup: Function
|
|
253
|
+
cleanup: Function;
|
|
295
254
|
};
|
|
296
255
|
|
|
297
256
|
function useMap(props: { mapId?: string; waitForLayer?: string }): useMapType {
|
|
298
257
|
// Use a useRef hook to reference the layer object to be able to access it later inside useEffect hooks
|
|
299
258
|
const mapContext: MapContextType = useContext(MapContext);
|
|
300
|
-
const [map, setMap] = useState();
|
|
259
|
+
const [map, setMap] = useState<MapLibreGlWrapper>();
|
|
301
260
|
|
|
302
261
|
const mapState = useMapState({
|
|
303
262
|
mapId: props.mapId,
|
|
@@ -312,8 +271,7 @@ function useMap(props: { mapId?: string; waitForLayer?: string }): useMapType {
|
|
|
312
271
|
});
|
|
313
272
|
|
|
314
273
|
const initializedRef = useRef(false);
|
|
315
|
-
const mapRef: MutableRefObject<MapLibreGlWrapper | undefined> =
|
|
316
|
-
useRef(undefined);
|
|
274
|
+
const mapRef: MutableRefObject<MapLibreGlWrapper | undefined> = useRef(undefined);
|
|
317
275
|
|
|
318
276
|
const componentId = useRef(uuidv4());
|
|
319
277
|
|
|
@@ -353,36 +311,30 @@ function useMap(props: { mapId?: string; waitForLayer?: string }): useMapType {
|
|
|
353
311
|
// initialize the layer and add it to the MapLibre-gl instance or do something else with it
|
|
354
312
|
initializedRef.current = true;
|
|
355
313
|
mapRef.current = mapContext.getMap(props.mapId);
|
|
356
|
-
// @ts-ignore
|
|
357
314
|
setMap(mapRef.current);
|
|
358
315
|
setMapIsReady(true);
|
|
359
|
-
}, [
|
|
360
|
-
mapContext.mapIds,
|
|
361
|
-
mapState.layers,
|
|
362
|
-
mapContext,
|
|
363
|
-
props.waitForLayer,
|
|
364
|
-
props.mapId,
|
|
365
|
-
]);
|
|
316
|
+
}, [mapContext.mapIds, mapState.layers, mapContext, props.waitForLayer, props.mapId]);
|
|
366
317
|
|
|
367
318
|
return {
|
|
368
319
|
map: map,
|
|
369
320
|
mapIsReady,
|
|
370
321
|
componentId: componentId.current,
|
|
371
322
|
layers: mapState.layers,
|
|
372
|
-
cleanup
|
|
323
|
+
cleanup,
|
|
373
324
|
};
|
|
374
325
|
}
|
|
375
326
|
|
|
376
327
|
export default useMap;
|
|
377
328
|
|
|
378
|
-
export type {useMapType}
|
|
329
|
+
export type { useMapType };
|
|
330
|
+
</pre></td></tr></table></pre>
|
|
379
331
|
|
|
380
332
|
<div class='push'></div><!-- for sticky footer -->
|
|
381
333
|
</div><!-- /wrapper -->
|
|
382
334
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
383
335
|
Code coverage generated by
|
|
384
336
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
385
|
-
at
|
|
337
|
+
at Thu Apr 21 2022 11:37:11 GMT+0000 (Coordinated Universal Time)
|
|
386
338
|
</div>
|
|
387
339
|
<script src="../../prettify.js"></script>
|
|
388
340
|
<script>
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
<span class="cline-any cline-neutral"> </span>
|
|
404
404
|
<span class="cline-any cline-neutral"> </span>
|
|
405
405
|
<span class="cline-any cline-neutral"> </span>
|
|
406
|
-
<span class="cline-any cline-yes">
|
|
406
|
+
<span class="cline-any cline-yes">14x</span>
|
|
407
407
|
<span class="cline-any cline-neutral"> </span>
|
|
408
408
|
<span class="cline-any cline-neutral"> </span>
|
|
409
409
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -415,7 +415,7 @@
|
|
|
415
415
|
<span class="cline-any cline-neutral"> </span>
|
|
416
416
|
<span class="cline-any cline-neutral"> </span>
|
|
417
417
|
<span class="cline-any cline-neutral"> </span>
|
|
418
|
-
<span class="cline-any cline-yes">
|
|
418
|
+
<span class="cline-any cline-yes">14x</span>
|
|
419
419
|
<span class="cline-any cline-neutral"> </span>
|
|
420
420
|
<span class="cline-any cline-neutral"> </span>
|
|
421
421
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -444,8 +444,7 @@
|
|
|
444
444
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useContext, useCallback, useState, useEffect, useRef } from "react";
|
|
445
445
|
import PropTypes from "prop-types";
|
|
446
446
|
import { v4 as uuidv4 } from "uuid";
|
|
447
|
-
|
|
448
|
-
import { MapContext } from "@mapcomponents/react-core";
|
|
447
|
+
import MapContext from "../contexts/MapContext";
|
|
449
448
|
import MapLibreGlWrapper, {
|
|
450
449
|
LayerState,
|
|
451
450
|
ViewportState,
|
|
@@ -462,6 +461,7 @@ type MapContext = {
|
|
|
462
461
|
getMap: Function;
|
|
463
462
|
setMap: Function;
|
|
464
463
|
};
|
|
464
|
+
|
|
465
465
|
/**
|
|
466
466
|
* React hook that allows subscribing to map state changes
|
|
467
467
|
*
|
|
@@ -481,7 +481,7 @@ function useMapState(props: {
|
|
|
481
481
|
};
|
|
482
482
|
}): useMapStateType {
|
|
483
483
|
// Use a useRef hook to reference the layer object to be able to access it later inside useEffect hooks
|
|
484
|
-
const mapContext
|
|
484
|
+
const mapContext = useContext<MapContextType>(MapContext);
|
|
485
485
|
|
|
486
486
|
const initializedRef = useRef(false);
|
|
487
487
|
const mapRef = useRef<MapLibreGlWrapper>();
|
|
@@ -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
|
|
640
|
+
at Thu Apr 21 2022 11:37:11 GMT+0000 (Coordinated Universal Time)
|
|
641
641
|
</div>
|
|
642
642
|
<script src="../../prettify.js"></script>
|
|
643
643
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">2.7% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>1/37</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">2.85% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>1/35</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
<span class="cline-any cline-neutral"> </span>
|
|
236
236
|
<span class="cline-any cline-neutral"> </span>
|
|
237
237
|
<span class="cline-any cline-neutral"> </span>
|
|
238
|
-
<span class="cline-any cline-
|
|
238
|
+
<span class="cline-any cline-yes">10x</span>
|
|
239
239
|
<span class="cline-any cline-neutral"> </span>
|
|
240
240
|
<span class="cline-any cline-neutral"> </span>
|
|
241
241
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -326,7 +326,7 @@ function <span class="fstat-no" title="function not covered" >useWms(</span>prop
|
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
|
|
329
|
+
useWms.defaultProps = {
|
|
330
330
|
url: "",
|
|
331
331
|
urlParameters: {
|
|
332
332
|
SERVICE: "WMS",
|
|
@@ -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
|
|
346
|
+
at Thu Apr 21 2022 11:37:11 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
|
|
104
|
+
at Thu Apr 21 2022 11:37:11 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -96,7 +96,15 @@
|
|
|
96
96
|
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
97
|
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
98
|
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
-
<a name='L34'></a><a href='#L34'>34</a
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
+
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
104
|
+
<span class="cline-any cline-neutral"> </span>
|
|
105
|
+
<span class="cline-any cline-neutral"> </span>
|
|
106
|
+
<span class="cline-any cline-neutral"> </span>
|
|
107
|
+
<span class="cline-any cline-neutral"> </span>
|
|
100
108
|
<span class="cline-any cline-neutral"> </span>
|
|
101
109
|
<span class="cline-any cline-neutral"> </span>
|
|
102
110
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -162,14 +170,18 @@ export { default as useLayer } from "./hooks/useLayer";
|
|
|
162
170
|
export { default as useMapState } from "./hooks/useMapState";
|
|
163
171
|
export { default as useMap } from "./hooks/useMap";
|
|
164
172
|
export { default as useWms } from "./hooks/useWms.js";
|
|
165
|
-
|
|
173
|
+
|
|
174
|
+
export { MapComponentsProvider } from './contexts/MapContext';
|
|
175
|
+
export { default as MapContext } from './contexts/MapContext';
|
|
176
|
+
export { default as SimpleDataProvider } from './contexts/SimpleDataProvider';
|
|
177
|
+
export { default as SimpleDataContext } from './contexts/SimpleDataContext';</pre></td></tr></table></pre>
|
|
166
178
|
|
|
167
179
|
<div class='push'></div><!-- for sticky footer -->
|
|
168
180
|
</div><!-- /wrapper -->
|
|
169
181
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
170
182
|
Code coverage generated by
|
|
171
183
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
172
|
-
at
|
|
184
|
+
at Thu Apr 21 2022 11:37:11 GMT+0000 (Coordinated Universal Time)
|
|
173
185
|
</div>
|
|
174
186
|
<script src="../prettify.js"></script>
|
|
175
187
|
<script>
|