@mapcomponents/react-maplibre 0.1.64 → 0.1.66
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 +20 -3
- package/coverage/coverage-final.json +2 -1
- package/coverage/lcov-report/index.html +24 -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/MlCenterPosition/MlCenterPosition.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCenterPosition/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/MlCreatePdfForm/MlCreatePdfForm.cy.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfForm/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/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.tsx.html +2 -2
- package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGpxViewer/MlGpxViewer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGpxViewer/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/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/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/MlOsmLayer.stories_.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/MlSketchTool/LayerList/ColorPicker.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerList.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerListItem.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerPropertyForm.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/MlSketchTool.tsx.html +2 -2
- package/coverage/lcov-report/src/components/MlSketchTool/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.tsx.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 +2 -2
- 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 +1 -1
- package/coverage/lcov-report/src/hooks/useCameraFollowPath/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useCameraFollowPath/useCameraFollowPath.tsx.html +1 -1
- package/coverage/lcov-report/src/hooks/useExportMap/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useExportMap/index.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useExportMap/lib.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useGpx/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useGpx/useGpx.tsx.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayerEvent.js.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayerFilter/index.html +116 -0
- package/coverage/lcov-report/src/hooks/useLayerFilter/useLayerFilter.ts.html +184 -0
- package/coverage/lcov-report/src/hooks/useLayerHoverPopup/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayerHoverPopup/useLayerHoverPopup.tsx.html +1 -1
- 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/useSource.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useWms.ts.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +5 -2
- package/coverage/lcov.info +35 -0
- package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +1 -1
- package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.stories.d.ts +12 -9
- package/dist/components/MlSketchTool/MlSketchTool.d.ts +1 -1
- package/dist/components/MlSketchTool/MlSketchTool.stories.d.ts +13 -9
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +20 -15
- package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.d.ts +20 -12
- package/dist/hooks/useLayerFilter/useLayerFilter.d.ts +8 -0
- package/dist/hooks/useLayerFilter/useLayerFilter.stories.d.ts +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +20 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/MlGeojsonLayerWithSource/{MlGeojsonLayerWithSource.stories.js → MlGeojsonLayerWithSource.stories.tsx} +0 -0
- package/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.tsx +1 -1
- package/src/components/MlGpxViewer/MlGpxViewer.stories.tsx +2 -2
- package/src/components/MlGpxViewer/util/MlGpxViewerInstructions.tsx +52 -49
- package/src/components/MlSketchTool/{MlSketchTool.stories.js → MlSketchTool.stories.tsx} +1 -1
- package/src/components/MlSketchTool/MlSketchTool.tsx +1 -1
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.tsx +3 -3
- package/src/components/MlThreeJsLayer/MlThreeJsLayer.stories.tsx +37 -0
- package/src/components/MlWmsFeatureInfoPopup/{MlWmsFeatureInfoPopup.stories.js → MlWmsFeatureInfoPopup.stories.tsx} +5 -5
- package/src/components/MlWmsLoader/MlWmsLoader.tsx +1 -1
- package/src/hooks/useLayerFilter/useLayerFilter.doc.de.md +3 -0
- package/src/hooks/useLayerFilter/useLayerFilter.meta_.json +14 -0
- package/src/hooks/useLayerFilter/useLayerFilter.stories.tsx +40 -0
- package/src/hooks/useLayerFilter/useLayerFilter.ts +33 -0
- package/src/index.ts +1 -0
- package/src/components/MlLayer/MlLayer.stories.js +0 -20
- package/src/components/MlThreeJsLayer/MlThreeJsLayer.stories.js +0 -39
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for src/hooks/useLayerFilter/useLayerFilter.ts</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/hooks/useLayerFilter</a> useLayerFilter.ts</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/12</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/9</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/3</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/11</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-neutral"> </span>
|
|
112
|
+
<span class="cline-any cline-no"> </span>
|
|
113
|
+
<span class="cline-any cline-no"> </span>
|
|
114
|
+
<span class="cline-any cline-neutral"> </span>
|
|
115
|
+
<span class="cline-any cline-no"> </span>
|
|
116
|
+
<span class="cline-any cline-no"> </span>
|
|
117
|
+
<span class="cline-any cline-neutral"> </span>
|
|
118
|
+
<span class="cline-any cline-no"> </span>
|
|
119
|
+
<span class="cline-any cline-no"> </span>
|
|
120
|
+
<span class="cline-any cline-no"> </span>
|
|
121
|
+
<span class="cline-any cline-no"> </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-no"> </span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-neutral"> </span>
|
|
128
|
+
<span class="cline-any cline-no"> </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 { useEffect } from 'react';
|
|
133
|
+
import useMap from '../useMap';
|
|
134
|
+
import { FilterSpecification } from 'maplibre-gl';
|
|
135
|
+
|
|
136
|
+
export interface UseLayerFilterProps {
|
|
137
|
+
mapId?: string;
|
|
138
|
+
layerId?: string;
|
|
139
|
+
filter?: FilterSpecification;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function <span class="fstat-no" title="function not covered" >useLayerFilter(</span>props: UseLayerFilterProps) {
|
|
143
|
+
const mapHook = <span class="cstat-no" title="statement not covered" >useMap({ mapId: props.mapId });</span>
|
|
144
|
+
|
|
145
|
+
<span class="cstat-no" title="statement not covered" > useEffect(<span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
146
|
+
<span class="cstat-no" title="statement not covered" > if (!mapHook.map || !props.layerId || !props.filter) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
147
|
+
|
|
148
|
+
<span class="cstat-no" title="statement not covered" > if (mapHook.map.map.getLayer(props.layerId)) {</span>
|
|
149
|
+
const _layerId = <span class="cstat-no" title="statement not covered" >props.layerId;</span>
|
|
150
|
+
|
|
151
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.map.setFilter(_layerId, props.filter);</span>
|
|
152
|
+
<span class="cstat-no" title="statement not covered" > return <span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
153
|
+
<span class="cstat-no" title="statement not covered" > if (mapHook.map) {</span>
|
|
154
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.map.setFilter(_layerId, null);</span>
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
<span class="cstat-no" title="statement not covered" > return;</span>
|
|
159
|
+
}, [props, mapHook.map]);
|
|
160
|
+
|
|
161
|
+
<span class="cstat-no" title="statement not covered" > return {};</span>
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export default useLayerFilter;
|
|
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 2023-01-23T12:34:46.087Z
|
|
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
|
+
|
|
@@ -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 2023-01-
|
|
104
|
+
at 2023-01-23T12:34:46.087Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -316,7 +316,7 @@ export default useLayerHoverPopup;
|
|
|
316
316
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
317
317
|
Code coverage generated by
|
|
318
318
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
319
|
-
at 2023-01-
|
|
319
|
+
at 2023-01-23T12:34:46.087Z
|
|
320
320
|
</div>
|
|
321
321
|
<script src="../../../prettify.js"></script>
|
|
322
322
|
<script>
|
|
@@ -343,7 +343,7 @@ export type { useMapType };
|
|
|
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 2023-01-
|
|
346
|
+
at 2023-01-23T12:34:46.087Z
|
|
347
347
|
</div>
|
|
348
348
|
<script src="../../prettify.js"></script>
|
|
349
349
|
<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 2023-01-
|
|
640
|
+
at 2023-01-23T12:34:46.087Z
|
|
641
641
|
</div>
|
|
642
642
|
<script src="../../prettify.js"></script>
|
|
643
643
|
<script>
|
|
@@ -322,7 +322,7 @@ export default useSource;
|
|
|
322
322
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
323
323
|
Code coverage generated by
|
|
324
324
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
325
|
-
at 2023-01-
|
|
325
|
+
at 2023-01-23T12:34:46.087Z
|
|
326
326
|
</div>
|
|
327
327
|
<script src="../../prettify.js"></script>
|
|
328
328
|
<script>
|
|
@@ -382,7 +382,7 @@ export default useWms;
|
|
|
382
382
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
383
383
|
Code coverage generated by
|
|
384
384
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
385
|
-
at 2023-01-
|
|
385
|
+
at 2023-01-23T12:34:46.087Z
|
|
386
386
|
</div>
|
|
387
387
|
<script src="../../prettify.js"></script>
|
|
388
388
|
<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 2023-01-
|
|
104
|
+
at 2023-01-23T12:34:46.087Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -108,7 +108,9 @@
|
|
|
108
108
|
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
109
|
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
110
|
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
-
<a name='L46'></a><a href='#L46'>46</a
|
|
111
|
+
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
+
<a name='L47'></a><a href='#L47'>47</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
113
|
+
<span class="cline-any cline-neutral"> </span>
|
|
112
114
|
<span class="cline-any cline-neutral"> </span>
|
|
113
115
|
<span class="cline-any cline-neutral"> </span>
|
|
114
116
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -193,6 +195,7 @@ export { default as useWms } from "./hooks/useWms";
|
|
|
193
195
|
export { default as useSource } from "./hooks/useSource";
|
|
194
196
|
export { default as useExportMap } from "./hooks/useExportMap";
|
|
195
197
|
export { default as useCameraFollowPath } from "./hooks/useCameraFollowPath/useCameraFollowPath";
|
|
198
|
+
export { default as useLayerFilter } from "./hooks/useLayerFilter/useLayerFilter";
|
|
196
199
|
|
|
197
200
|
export { MapComponentsProvider } from "./contexts/MapContext";
|
|
198
201
|
export { default as MapContext } from "./contexts/MapContext";
|
|
@@ -205,7 +208,7 @@ export { default as SimpleDataContext } from "./contexts/SimpleDataContext";
|
|
|
205
208
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
206
209
|
Code coverage generated by
|
|
207
210
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
208
|
-
at 2023-01-
|
|
211
|
+
at 2023-01-23T12:34:46.087Z
|
|
209
212
|
</div>
|
|
210
213
|
<script src="../prettify.js"></script>
|
|
211
214
|
<script>
|
package/coverage/lcov.info
CHANGED
|
@@ -3784,6 +3784,41 @@ BRF:6
|
|
|
3784
3784
|
BRH:5
|
|
3785
3785
|
end_of_record
|
|
3786
3786
|
TN:
|
|
3787
|
+
SF:src/hooks/useLayerFilter/useLayerFilter.ts
|
|
3788
|
+
FN:11,useLayerFilter
|
|
3789
|
+
FN:14,(anonymous_1)
|
|
3790
|
+
FN:21,(anonymous_2)
|
|
3791
|
+
FNF:3
|
|
3792
|
+
FNH:0
|
|
3793
|
+
FNDA:0,useLayerFilter
|
|
3794
|
+
FNDA:0,(anonymous_1)
|
|
3795
|
+
FNDA:0,(anonymous_2)
|
|
3796
|
+
DA:12,0
|
|
3797
|
+
DA:14,0
|
|
3798
|
+
DA:15,0
|
|
3799
|
+
DA:17,0
|
|
3800
|
+
DA:18,0
|
|
3801
|
+
DA:20,0
|
|
3802
|
+
DA:21,0
|
|
3803
|
+
DA:22,0
|
|
3804
|
+
DA:23,0
|
|
3805
|
+
DA:27,0
|
|
3806
|
+
DA:30,0
|
|
3807
|
+
LF:11
|
|
3808
|
+
LH:0
|
|
3809
|
+
BRDA:15,0,0,0
|
|
3810
|
+
BRDA:15,0,1,0
|
|
3811
|
+
BRDA:15,1,0,0
|
|
3812
|
+
BRDA:15,1,1,0
|
|
3813
|
+
BRDA:15,1,2,0
|
|
3814
|
+
BRDA:17,2,0,0
|
|
3815
|
+
BRDA:17,2,1,0
|
|
3816
|
+
BRDA:22,3,0,0
|
|
3817
|
+
BRDA:22,3,1,0
|
|
3818
|
+
BRF:9
|
|
3819
|
+
BRH:0
|
|
3820
|
+
end_of_record
|
|
3821
|
+
TN:
|
|
3787
3822
|
SF:src/hooks/useLayerHoverPopup/useLayerHoverPopup.tsx
|
|
3788
3823
|
FN:25,(anonymous_0)
|
|
3789
3824
|
FN:37,(anonymous_1)
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlGeojsonLayerWithSource").MlGeojsonLayerWithSourceProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
mapId: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
argTypes: {};
|
|
10
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
11
|
+
};
|
|
1
12
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlGeojsonLayerWithSource as component };
|
|
6
|
-
export const argTypes: {};
|
|
7
|
-
export { mapContextDecorator as decorators };
|
|
8
|
-
}
|
|
9
|
-
import MlGeojsonLayerWithSource from "./MlGeojsonLayerWithSource";
|
|
10
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
13
|
+
export declare const ExampleConfig: any;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlSketchTool").MlSketchToolProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
mapId: undefined;
|
|
7
|
+
buttonStyleOverride: {};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
argTypes: {};
|
|
11
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
12
|
+
};
|
|
1
13
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlSketchTool as component };
|
|
6
|
-
export const argTypes: {};
|
|
7
|
-
export { mapContextDecorator as decorators };
|
|
8
|
-
}
|
|
9
|
-
import MlSketchTool from "./MlSketchTool";
|
|
10
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
14
|
+
export declare const ExampleConfig: any;
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: any): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
mapId: import("prop-types").Requireable<string>;
|
|
7
|
+
init: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
8
|
+
onDone: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
argTypes: {
|
|
12
|
+
options: {
|
|
13
|
+
control: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
19
|
+
};
|
|
1
20
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlThreeJsLayer as component };
|
|
6
|
-
export namespace argTypes {
|
|
7
|
-
namespace options {
|
|
8
|
-
namespace control {
|
|
9
|
-
const type: string;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export { mapContextDecorator as decorators };
|
|
14
|
-
}
|
|
15
|
-
import MlThreeJsLayer from "./MlThreeJsLayer";
|
|
16
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
21
|
+
export declare const ExampleConfig: any;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: {
|
|
5
|
+
mapId: string;
|
|
6
|
+
}): JSX.Element;
|
|
7
|
+
defaultProps: {
|
|
8
|
+
mapId: undefined;
|
|
9
|
+
};
|
|
10
|
+
propTypes: {
|
|
11
|
+
mapId: import("prop-types").Requireable<string>;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
argTypes: {
|
|
15
|
+
url: {};
|
|
16
|
+
layer: {};
|
|
17
|
+
};
|
|
18
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
19
|
+
};
|
|
1
20
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlWmsFeatureInfoPopup as component };
|
|
6
|
-
export namespace argTypes {
|
|
7
|
-
const url: {};
|
|
8
|
-
const layer: {};
|
|
9
|
-
}
|
|
10
|
-
export { mapContextDecorator as decorators };
|
|
11
|
-
}
|
|
12
|
-
import MlWmsFeatureInfoPopup from "./MlWmsFeatureInfoPopup";
|
|
13
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
21
|
+
export declare const ExampleConfig: any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import useLayerFilter from './useLayerFilter';
|
|
2
|
+
declare const storyoptions: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof useLayerFilter;
|
|
5
|
+
argTypes: {};
|
|
6
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
7
|
+
};
|
|
8
|
+
export default storyoptions;
|
|
9
|
+
export declare const ExampleConfig: any;
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export { default as useWms } from "./hooks/useWms";
|
|
|
32
32
|
export { default as useSource } from "./hooks/useSource";
|
|
33
33
|
export { default as useExportMap } from "./hooks/useExportMap";
|
|
34
34
|
export { default as useCameraFollowPath } from "./hooks/useCameraFollowPath/useCameraFollowPath";
|
|
35
|
+
export { default as useLayerFilter } from "./hooks/useLayerFilter/useLayerFilter";
|
|
35
36
|
export { MapComponentsProvider } from "./contexts/MapContext";
|
|
36
37
|
export { default as MapContext } from "./contexts/MapContext";
|
|
37
38
|
export { default as SimpleDataProvider } from "./contexts/SimpleDataProvider";
|
package/dist/index.esm.js
CHANGED
|
@@ -14226,6 +14226,25 @@ useCameraFollowPath.defaultProps = {
|
|
|
14226
14226
|
zoom: 18,
|
|
14227
14227
|
};
|
|
14228
14228
|
|
|
14229
|
+
function useLayerFilter(props) {
|
|
14230
|
+
var mapHook = useMap({ mapId: props.mapId });
|
|
14231
|
+
useEffect(function () {
|
|
14232
|
+
if (!mapHook.map || !props.layerId || !props.filter)
|
|
14233
|
+
return;
|
|
14234
|
+
if (mapHook.map.map.getLayer(props.layerId)) {
|
|
14235
|
+
var _layerId_1 = props.layerId;
|
|
14236
|
+
mapHook.map.map.setFilter(_layerId_1, props.filter);
|
|
14237
|
+
return function () {
|
|
14238
|
+
if (mapHook.map) {
|
|
14239
|
+
mapHook.map.map.setFilter(_layerId_1, null);
|
|
14240
|
+
}
|
|
14241
|
+
};
|
|
14242
|
+
}
|
|
14243
|
+
return;
|
|
14244
|
+
}, [props, mapHook.map]);
|
|
14245
|
+
return {};
|
|
14246
|
+
}
|
|
14247
|
+
|
|
14229
14248
|
var SimpleDataContext = /*#__PURE__*/React__default.createContext({});
|
|
14230
14249
|
var SimpleDataContextProvider = SimpleDataContext.Provider;
|
|
14231
14250
|
|
|
@@ -14282,5 +14301,5 @@ SimpleDataProvider.propTypes = {
|
|
|
14282
14301
|
children: PropTypes.node.isRequired
|
|
14283
14302
|
};
|
|
14284
14303
|
|
|
14285
|
-
export { GeoJsonContext, GeoJsonProvider, MapComponentsProvider, MapContext, MapLibreMap, MlBasicComponent, MlComponentTemplate, MlCreatePdfButton, MlCreatePdfForm, MlFeatureEditor, MlFillExtrusionLayer, MlFollowGps, MlGeoJsonLayer, MlGpxViewer, MlImageMarkerLayer, MlLayer, MlLayerMagnify, MlLayerSwipe, MlMarker, MlMeasureTool, MlNavigationCompass, MlNavigationTools, MlOsmLayer, PdfPreview as MlPdfPreview, MlScaleReference, MlSpatialElevationProfile, MlTransitionGeoJsonLayer, MlVectorTileLayer, MlWmsLayer, SimpleDataContext, SimpleDataProvider, useCameraFollowPath, useExportMap, useLayer, useMap, useMapState, useSource, useWms };
|
|
14304
|
+
export { GeoJsonContext, GeoJsonProvider, MapComponentsProvider, MapContext, MapLibreMap, MlBasicComponent, MlComponentTemplate, MlCreatePdfButton, MlCreatePdfForm, MlFeatureEditor, MlFillExtrusionLayer, MlFollowGps, MlGeoJsonLayer, MlGpxViewer, MlImageMarkerLayer, MlLayer, MlLayerMagnify, MlLayerSwipe, MlMarker, MlMeasureTool, MlNavigationCompass, MlNavigationTools, MlOsmLayer, PdfPreview as MlPdfPreview, MlScaleReference, MlSpatialElevationProfile, MlTransitionGeoJsonLayer, MlVectorTileLayer, MlWmsLayer, SimpleDataContext, SimpleDataProvider, useCameraFollowPath, useExportMap, useLayer, useLayerFilter, useMap, useMapState, useSource, useWms };
|
|
14286
14305
|
//# sourceMappingURL=index.esm.js.map
|