@mapcomponents/react-maplibre 0.1.45 → 0.1.46
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 +9 -0
- package/coverage/clover.xml +206 -132
- package/coverage/coverage-final.json +7 -5
- package/coverage/lcov-report/index.html +86 -71
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +40 -10
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +17 -17
- 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 +188 -53
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +21 -21
- 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 +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 +1 -1
- package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +184 -0
- package/coverage/lcov-report/src/components/MlMeasureTool/index.html +116 -0
- 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/MlOsmLayer.stories_.js.html +232 -0
- package/coverage/lcov-report/src/components/MlOsmLayer/index.html +25 -10
- 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 +74 -20
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +19 -19
- 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 +80 -20
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +21 -21
- 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 +19 -19
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +46 -22
- 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 +9 -6
- package/coverage/lcov.info +422 -252
- package/dist/index.esm.js +127 -36
- package/dist/index.esm.js.map +1 -1
- package/docs-build/{0.b1b9b035.iframe.bundle.js → 0.0ee4f98c.iframe.bundle.js} +2 -2
- package/docs-build/0.0ee4f98c.iframe.bundle.js.map +1 -0
- package/docs-build/{1.c50fb367.iframe.bundle.js → 1.bb3cf738.iframe.bundle.js} +3 -3
- package/docs-build/1.bb3cf738.iframe.bundle.js.map +1 -0
- package/docs-build/{17.2e544968.iframe.bundle.js → 17.97db5b3f.iframe.bundle.js} +2 -2
- package/docs-build/17.97db5b3f.iframe.bundle.js.map +1 -0
- package/docs-build/{18.42087006.iframe.bundle.js → 18.f8d843df.iframe.bundle.js} +3 -3
- package/docs-build/18.f8d843df.iframe.bundle.js.map +1 -0
- package/docs-build/{19.7e782442.iframe.bundle.js → 19.c45e6b08.iframe.bundle.js} +2 -2
- package/docs-build/19.c45e6b08.iframe.bundle.js.map +1 -0
- package/docs-build/{2.e58dc625.iframe.bundle.js → 2.42c790e4.iframe.bundle.js} +2 -2
- package/docs-build/2.42c790e4.iframe.bundle.js.map +1 -0
- package/docs-build/{20.f009289a.iframe.bundle.js → 20.120bbcfb.iframe.bundle.js} +2 -2
- package/docs-build/20.120bbcfb.iframe.bundle.js.map +1 -0
- package/docs-build/{21.1cdc9040.iframe.bundle.js → 21.37c885f1.iframe.bundle.js} +2 -2
- package/docs-build/21.37c885f1.iframe.bundle.js.map +1 -0
- package/docs-build/{22.c9e6b2d7.iframe.bundle.js → 22.7fbc99f4.iframe.bundle.js} +2 -2
- package/docs-build/22.7fbc99f4.iframe.bundle.js.map +1 -0
- package/docs-build/{3.a8172b89.iframe.bundle.js → 3.1a37a83e.iframe.bundle.js} +2 -2
- package/docs-build/3.1a37a83e.iframe.bundle.js.map +1 -0
- package/docs-build/iframe.html +1 -1
- package/docs-build/main~24120820.905c51c8.iframe.bundle.js +2 -0
- package/docs-build/main~24120820.905c51c8.iframe.bundle.js.map +1 -0
- package/docs-build/thumbnails/MlMeasureTool.png +0 -0
- package/docs-build/{vendors~main~0ad7406a.2054ae7c.iframe.bundle.js → vendors~main~0ad7406a.93aea1be.iframe.bundle.js} +3 -3
- package/docs-build/vendors~main~0ad7406a.93aea1be.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~0f485567.6e7163ef.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~0f485567.6e7163ef.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~41a6ab2c.a947ed53.iframe.bundle.js → vendors~main~41a6ab2c.da377733.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~41a6ab2c.da377733.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~52589227.1d1558cd.iframe.bundle.js → vendors~main~52589227.cebbe724.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~52589227.cebbe724.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~57c1f6cb.6a433835.iframe.bundle.js → vendors~main~57c1f6cb.86178471.iframe.bundle.js} +2 -2
- package/docs-build/vendors~main~57c1f6cb.86178471.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~73914085.a8e03e3b.iframe.bundle.js → vendors~main~73914085.e2f34f8e.iframe.bundle.js} +6 -6
- package/docs-build/{vendors~main~73914085.a8e03e3b.iframe.bundle.js.map → vendors~main~73914085.e2f34f8e.iframe.bundle.js.map} +1 -1
- package/docs-build/{vendors~main~9c5b28f6.7b8beed1.iframe.bundle.js → vendors~main~9c5b28f6.eefa7445.iframe.bundle.js} +3 -3
- package/docs-build/vendors~main~9c5b28f6.eefa7445.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~b5906859.7f66dcaf.iframe.bundle.js → vendors~main~b5906859.210afc21.iframe.bundle.js} +5 -5
- package/docs-build/vendors~main~b5906859.210afc21.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~b8f44717.7053e467.iframe.bundle.js → vendors~main~b8f44717.7b869975.iframe.bundle.js} +3 -3
- package/docs-build/vendors~main~b8f44717.7b869975.iframe.bundle.js.map +1 -0
- package/docs-build/{vendors~main~b9cf3951.a4fd68f5.iframe.bundle.js → vendors~main~b9cf3951.62d39717.iframe.bundle.js} +11 -11
- package/docs-build/vendors~main~b9cf3951.62d39717.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~d939e436.394e3bc7.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~d939e436.394e3bc7.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~f420d588.88814a6a.iframe.bundle.js +107 -0
- package/docs-build/vendors~main~f420d588.88814a6a.iframe.bundle.js.map +1 -0
- package/package.json +1 -1
- package/public/thumbnails/MlMeasureTool.png +0 -0
- package/src/components/MapLibreMap/MapLibreMap.stories.js +75 -20
- package/src/components/MapLibreMap/MapLibreMap.tsx +11 -1
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +2 -2
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.test.js +1 -1
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx +82 -37
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.js +1 -1
- package/src/components/MlMeasureTool/MlMeasureTool.doc.de.md +3 -0
- package/src/components/MlMeasureTool/MlMeasureTool.meta.json +15 -0
- package/src/components/MlMeasureTool/MlMeasureTool.stories.js +67 -0
- package/src/components/MlMeasureTool/MlMeasureTool.tsx +33 -0
- package/src/components/MlOsmLayer/{MlOsmLayer.stories.js → MlOsmLayer.stories_.js} +0 -0
- package/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx +26 -8
- package/src/components/MlWmsLayer/MlWmsLayer.stories.js +2 -3
- package/src/components/MlWmsLayer/MlWmsLayer.tsx +27 -7
- package/src/hooks/useLayer.ts +15 -7
- package/src/index.ts +4 -4
- package/src/util/layerRemovalTest.js +5 -0
- package/docs-build/0.b1b9b035.iframe.bundle.js.map +0 -1
- package/docs-build/1.c50fb367.iframe.bundle.js.map +0 -1
- package/docs-build/17.2e544968.iframe.bundle.js.map +0 -1
- package/docs-build/18.42087006.iframe.bundle.js.map +0 -1
- package/docs-build/19.7e782442.iframe.bundle.js.map +0 -1
- package/docs-build/2.e58dc625.iframe.bundle.js.map +0 -1
- package/docs-build/20.f009289a.iframe.bundle.js.map +0 -1
- package/docs-build/21.1cdc9040.iframe.bundle.js.map +0 -1
- package/docs-build/22.c9e6b2d7.iframe.bundle.js.map +0 -1
- package/docs-build/3.a8172b89.iframe.bundle.js.map +0 -1
- package/docs-build/main~24120820.edd86ba9.iframe.bundle.js +0 -2
- package/docs-build/main~24120820.edd86ba9.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~0ad7406a.2054ae7c.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~0f485567.de36692f.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~0f485567.de36692f.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~41a6ab2c.a947ed53.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~52589227.1d1558cd.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~57c1f6cb.6a433835.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~9c5b28f6.7b8beed1.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b5906859.7f66dcaf.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b8f44717.7053e467.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b9cf3951.a4fd68f5.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~d939e436.ba1cad1b.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~d939e436.ba1cad1b.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~f420d588.59c93444.iframe.bundle.js +0 -107
- package/docs-build/vendors~main~f420d588.59c93444.iframe.bundle.js.map +0 -1
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for src/components/MlMeasureTool/MlMeasureTool.tsx</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> / <a href="index.html">src/components/MlMeasureTool</a> MlMeasureTool.tsx</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>0/7</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/10</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>0/2</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>0/7</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
+
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
100
|
+
<span class="cline-any cline-neutral"> </span>
|
|
101
|
+
<span class="cline-any cline-neutral"> </span>
|
|
102
|
+
<span class="cline-any cline-neutral"> </span>
|
|
103
|
+
<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>
|
|
108
|
+
<span class="cline-any cline-neutral"> </span>
|
|
109
|
+
<span class="cline-any cline-neutral"> </span>
|
|
110
|
+
<span class="cline-any cline-no"> </span>
|
|
111
|
+
<span class="cline-any cline-no"> </span>
|
|
112
|
+
<span class="cline-any cline-neutral"> </span>
|
|
113
|
+
<span class="cline-any cline-no"> </span>
|
|
114
|
+
<span class="cline-any cline-neutral"> </span>
|
|
115
|
+
<span class="cline-any cline-neutral"> </span>
|
|
116
|
+
<span class="cline-any cline-neutral"> </span>
|
|
117
|
+
<span class="cline-any cline-no"> </span>
|
|
118
|
+
<span class="cline-any cline-no"> </span>
|
|
119
|
+
<span class="cline-any cline-no"> </span>
|
|
120
|
+
<span class="cline-any cline-neutral"> </span>
|
|
121
|
+
<span class="cline-any cline-neutral"> </span>
|
|
122
|
+
<span class="cline-any cline-neutral"> </span>
|
|
123
|
+
<span class="cline-any cline-neutral"> </span>
|
|
124
|
+
<span class="cline-any cline-neutral"> </span>
|
|
125
|
+
<span class="cline-any cline-neutral"> </span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-no"> </span>
|
|
128
|
+
<span class="cline-any cline-neutral"> </span>
|
|
129
|
+
<span class="cline-any cline-neutral"> </span>
|
|
130
|
+
<span class="cline-any cline-neutral"> </span>
|
|
131
|
+
<span class="cline-any cline-neutral"> </span>
|
|
132
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState } from "react";
|
|
133
|
+
import MlFeatureEditor from "../MlFeatureEditor/MlFeatureEditor";
|
|
134
|
+
import * as turf from "@turf/turf";
|
|
135
|
+
|
|
136
|
+
interface MlMeasureToolProps {
|
|
137
|
+
/**
|
|
138
|
+
* String that specify if the Tool measures an area ("polygon") or length ("line")
|
|
139
|
+
*/
|
|
140
|
+
measureType: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const MlMeasureTool = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>rops: MlMeasureToolProps) => {</span>
|
|
144
|
+
const [length, setLength] = <span class="cstat-no" title="statement not covered" >useState(0)</span>
|
|
145
|
+
|
|
146
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
147
|
+
<>
|
|
148
|
+
<MlFeatureEditor
|
|
149
|
+
onChange={<span class="fstat-no" title="function not covered" >(f</span>eatures) => {
|
|
150
|
+
<span class="cstat-no" title="statement not covered" > console.log(features);</span>
|
|
151
|
+
<span class="cstat-no" title="statement not covered" > if(features[0]) {</span>
|
|
152
|
+
<span class="cstat-no" title="statement not covered" > setLength(props.measureType === "polygon" ? turf.area(features[0]) / 1000000 : turf.length(features[0]));</span>
|
|
153
|
+
}}}
|
|
154
|
+
mode = {props.measureType === "polygon" ? "custom_polygon" : "draw_line_string"}
|
|
155
|
+
/>
|
|
156
|
+
{props.measureType === "polygon" ? "Area" : "Length"}: {length.toFixed(2)} {props.measureType === "polygon" ? "km²" : "km"}
|
|
157
|
+
</>);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
<span class="cstat-no" title="statement not covered" >MlMeasureTool.defaultProps = {</span>
|
|
161
|
+
mapId: undefined,
|
|
162
|
+
measureType: "line",
|
|
163
|
+
};
|
|
164
|
+
export default MlMeasureTool;
|
|
165
|
+
</pre></td></tr></table></pre>
|
|
166
|
+
|
|
167
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
168
|
+
</div><!-- /wrapper -->
|
|
169
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
170
|
+
Code coverage generated by
|
|
171
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
172
|
+
at Sun Jun 12 2022 17:06:19 GMT+0000 (Coordinated Universal Time)
|
|
173
|
+
</div>
|
|
174
|
+
<script src="../../../prettify.js"></script>
|
|
175
|
+
<script>
|
|
176
|
+
window.onload = function () {
|
|
177
|
+
prettyPrint();
|
|
178
|
+
};
|
|
179
|
+
</script>
|
|
180
|
+
<script src="../../../sorter.js"></script>
|
|
181
|
+
<script src="../../../block-navigation.js"></script>
|
|
182
|
+
</body>
|
|
183
|
+
</html>
|
|
184
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for src/components/MlMeasureTool</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> src/components/MlMeasureTool</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>0/7</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/10</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>0/2</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>0/7</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
|
+
<div class="pad1">
|
|
66
|
+
<table class="coverage-summary">
|
|
67
|
+
<thead>
|
|
68
|
+
<tr>
|
|
69
|
+
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
+
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
+
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
+
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
+
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
+
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
+
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
+
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
+
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
+
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
+
</tr>
|
|
80
|
+
</thead>
|
|
81
|
+
<tbody><tr>
|
|
82
|
+
<td class="file low" data-value="MlMeasureTool.tsx"><a href="MlMeasureTool.tsx.html">MlMeasureTool.tsx</a></td>
|
|
83
|
+
<td data-value="0" class="pic low">
|
|
84
|
+
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
85
|
+
</td>
|
|
86
|
+
<td data-value="0" class="pct low">0%</td>
|
|
87
|
+
<td data-value="7" class="abs low">0/7</td>
|
|
88
|
+
<td data-value="0" class="pct low">0%</td>
|
|
89
|
+
<td data-value="10" class="abs low">0/10</td>
|
|
90
|
+
<td data-value="0" class="pct low">0%</td>
|
|
91
|
+
<td data-value="2" class="abs low">0/2</td>
|
|
92
|
+
<td data-value="0" class="pct low">0%</td>
|
|
93
|
+
<td data-value="7" class="abs low">0/7</td>
|
|
94
|
+
</tr>
|
|
95
|
+
|
|
96
|
+
</tbody>
|
|
97
|
+
</table>
|
|
98
|
+
</div>
|
|
99
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
100
|
+
</div><!-- /wrapper -->
|
|
101
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
|
+
Code coverage generated by
|
|
103
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
+
at Sun Jun 12 2022 17:06:19 GMT+0000 (Coordinated Universal Time)
|
|
105
|
+
</div>
|
|
106
|
+
<script src="../../../prettify.js"></script>
|
|
107
|
+
<script>
|
|
108
|
+
window.onload = function () {
|
|
109
|
+
prettyPrint();
|
|
110
|
+
};
|
|
111
|
+
</script>
|
|
112
|
+
<script src="../../../sorter.js"></script>
|
|
113
|
+
<script src="../../../block-navigation.js"></script>
|
|
114
|
+
</body>
|
|
115
|
+
</html>
|
|
116
|
+
|
package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html
CHANGED
|
@@ -748,7 +748,7 @@ export default MlNavigationCompass;
|
|
|
748
748
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
749
749
|
Code coverage generated by
|
|
750
750
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
751
|
-
at
|
|
751
|
+
at Sun Jun 12 2022 17:06:19 GMT+0000 (Coordinated Universal Time)
|
|
752
752
|
</div>
|
|
753
753
|
<script src="../../../prettify.js"></script>
|
|
754
754
|
<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 Sun Jun 12 2022 17:06:19 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -487,7 +487,7 @@ export default MlNavigationTools;
|
|
|
487
487
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
488
488
|
Code coverage generated by
|
|
489
489
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
490
|
-
at
|
|
490
|
+
at Sun Jun 12 2022 17:06:19 GMT+0000 (Coordinated Universal Time)
|
|
491
491
|
</div>
|
|
492
492
|
<script src="../../../prettify.js"></script>
|
|
493
493
|
<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 Sun Jun 12 2022 17:06:19 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -283,7 +283,7 @@ export default MlOsmLayer;
|
|
|
283
283
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
284
284
|
Code coverage generated by
|
|
285
285
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
286
|
-
at
|
|
286
|
+
at Sun Jun 12 2022 17:06:19 GMT+0000 (Coordinated Universal Time)
|
|
287
287
|
</div>
|
|
288
288
|
<script src="../../../prettify.js"></script>
|
|
289
289
|
<script>
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for src/components/MlOsmLayer/MlOsmLayer.stories_.js</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> / <a href="index.html">src/components/MlOsmLayer</a> MlOsmLayer.stories_.js</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">0% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>0/7</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/4</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>0/2</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">0% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>0/7</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
+
<a name='L33'></a><a href='#L33'>33</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>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
+
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
+
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
+
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
+
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
+
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
+
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
+
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
+
<a name='L50'></a><a href='#L50'>50</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
116
|
+
<span class="cline-any cline-neutral"> </span>
|
|
117
|
+
<span class="cline-any cline-neutral"> </span>
|
|
118
|
+
<span class="cline-any cline-neutral"> </span>
|
|
119
|
+
<span class="cline-any cline-neutral"> </span>
|
|
120
|
+
<span class="cline-any cline-neutral"> </span>
|
|
121
|
+
<span class="cline-any cline-neutral"> </span>
|
|
122
|
+
<span class="cline-any cline-neutral"> </span>
|
|
123
|
+
<span class="cline-any cline-no"> </span>
|
|
124
|
+
<span class="cline-any cline-neutral"> </span>
|
|
125
|
+
<span class="cline-any cline-neutral"> </span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-neutral"> </span>
|
|
128
|
+
<span class="cline-any cline-neutral"> </span>
|
|
129
|
+
<span class="cline-any cline-neutral"> </span>
|
|
130
|
+
<span class="cline-any cline-neutral"> </span>
|
|
131
|
+
<span class="cline-any cline-neutral"> </span>
|
|
132
|
+
<span class="cline-any cline-neutral"> </span>
|
|
133
|
+
<span class="cline-any cline-neutral"> </span>
|
|
134
|
+
<span class="cline-any cline-neutral"> </span>
|
|
135
|
+
<span class="cline-any cline-neutral"> </span>
|
|
136
|
+
<span class="cline-any cline-neutral"> </span>
|
|
137
|
+
<span class="cline-any cline-no"> </span>
|
|
138
|
+
<span class="cline-any cline-no"> </span>
|
|
139
|
+
<span class="cline-any cline-neutral"> </span>
|
|
140
|
+
<span class="cline-any cline-no"> </span>
|
|
141
|
+
<span class="cline-any cline-neutral"> </span>
|
|
142
|
+
<span class="cline-any cline-neutral"> </span>
|
|
143
|
+
<span class="cline-any cline-neutral"> </span>
|
|
144
|
+
<span class="cline-any cline-neutral"> </span>
|
|
145
|
+
<span class="cline-any cline-no"> </span>
|
|
146
|
+
<span class="cline-any cline-neutral"> </span>
|
|
147
|
+
<span class="cline-any cline-neutral"> </span>
|
|
148
|
+
<span class="cline-any cline-neutral"> </span>
|
|
149
|
+
<span class="cline-any cline-neutral"> </span>
|
|
150
|
+
<span class="cline-any cline-neutral"> </span>
|
|
151
|
+
<span class="cline-any cline-neutral"> </span>
|
|
152
|
+
<span class="cline-any cline-neutral"> </span>
|
|
153
|
+
<span class="cline-any cline-neutral"> </span>
|
|
154
|
+
<span class="cline-any cline-neutral"> </span>
|
|
155
|
+
<span class="cline-any cline-no"> </span>
|
|
156
|
+
<span class="cline-any cline-no"> </span>
|
|
157
|
+
<span class="cline-any cline-neutral"> </span>
|
|
158
|
+
<span class="cline-any cline-neutral"> </span>
|
|
159
|
+
<span class="cline-any cline-neutral"> </span>
|
|
160
|
+
<span class="cline-any cline-neutral"> </span>
|
|
161
|
+
<span class="cline-any cline-neutral"> </span>
|
|
162
|
+
<span class="cline-any cline-neutral"> </span>
|
|
163
|
+
<span class="cline-any cline-neutral"> </span>
|
|
164
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState, useEffect } from "react";
|
|
165
|
+
|
|
166
|
+
import MlOsmLayer from "./MlOsmLayer";
|
|
167
|
+
import TopToolbar from "../../ui_components/TopToolbar";
|
|
168
|
+
import Button from "@mui/material/Button";
|
|
169
|
+
|
|
170
|
+
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
171
|
+
|
|
172
|
+
const storyoptions = <span class="cstat-no" title="statement not covered" >{</span>
|
|
173
|
+
title: "MapComponents/MlOsmLayer",
|
|
174
|
+
component: MlOsmLayer,
|
|
175
|
+
argTypes: {
|
|
176
|
+
options: {
|
|
177
|
+
control: {
|
|
178
|
+
type: "object",
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
decorators: mapContextDecorator,
|
|
183
|
+
};
|
|
184
|
+
export default storyoptions;
|
|
185
|
+
|
|
186
|
+
const Template = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>rops) => {</span>
|
|
187
|
+
const [showLayer, setShowLayer] = <span class="cstat-no" title="statement not covered" >useState(true);</span>
|
|
188
|
+
|
|
189
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
190
|
+
<TopToolbar>
|
|
191
|
+
<Button
|
|
192
|
+
color="primary"
|
|
193
|
+
variant={showLayer ? "contained" : "outlined"}
|
|
194
|
+
onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setShowLayer(!showLayer)}</span>
|
|
195
|
+
>
|
|
196
|
+
OSM
|
|
197
|
+
</Button>
|
|
198
|
+
{showLayer && <MlOsmLayer {...props} />}
|
|
199
|
+
</TopToolbar>
|
|
200
|
+
);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// <MapLibreMap options={args.options} />
|
|
204
|
+
export const ExampleConfig = <span class="cstat-no" title="statement not covered" >Template.bind({});</span>
|
|
205
|
+
<span class="cstat-no" title="statement not covered" >ExampleConfig.args = {</span>
|
|
206
|
+
sourceOptions: {
|
|
207
|
+
tiles: ["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg"],
|
|
208
|
+
attribution:
|
|
209
|
+
'Map tiles by <a target="_top" rel="noopener" href="http://stamen.com">Stamen Design</a>, under <a target="_top" rel="noopener" href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a target="_top" rel="noopener" href="http://openstreetmap.org">OpenStreetMap</a>, under <a target="_top" rel="noopener" href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>',
|
|
210
|
+
},
|
|
211
|
+
layerOptions: {},
|
|
212
|
+
};
|
|
213
|
+
</pre></td></tr></table></pre>
|
|
214
|
+
|
|
215
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
216
|
+
</div><!-- /wrapper -->
|
|
217
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
218
|
+
Code coverage generated by
|
|
219
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
220
|
+
at Sun Jun 12 2022 17:06:19 GMT+0000 (Coordinated Universal Time)
|
|
221
|
+
</div>
|
|
222
|
+
<script src="../../../prettify.js"></script>
|
|
223
|
+
<script>
|
|
224
|
+
window.onload = function () {
|
|
225
|
+
prettyPrint();
|
|
226
|
+
};
|
|
227
|
+
</script>
|
|
228
|
+
<script src="../../../sorter.js"></script>
|
|
229
|
+
<script src="../../../block-navigation.js"></script>
|
|
230
|
+
</body>
|
|
231
|
+
</html>
|
|
232
|
+
|