@mapcomponents/react-maplibre 0.1.54 → 0.1.57

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.
Files changed (95) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/coverage/clover.xml +89 -83
  3. package/coverage/coverage-final.json +3 -3
  4. package/coverage/lcov-report/index.html +22 -22
  5. package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +1 -1
  6. package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
  7. package/coverage/lcov-report/src/components/MlCenterPosition/MlCenterPosition.tsx.html +1 -1
  8. package/coverage/lcov-report/src/components/MlCenterPosition/index.html +1 -1
  9. package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +1 -1
  10. package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
  11. package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +1 -1
  12. package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
  13. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
  14. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
  15. package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +123 -36
  16. package/coverage/lcov-report/src/components/MlFollowGps/index.html +15 -15
  17. package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +1 -1
  18. package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +1 -1
  19. package/coverage/lcov-report/src/components/MlGPXViewer/index.html +1 -1
  20. package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +1 -1
  21. package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
  22. package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +1 -1
  23. package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
  24. package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +2 -2
  25. package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
  26. package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +1 -1
  27. package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
  28. package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +1 -1
  29. package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +1 -1
  30. package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
  31. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
  32. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
  33. package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
  34. package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
  35. package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
  36. package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
  37. package/coverage/lcov-report/src/components/MlMeasureTool/index.html +1 -1
  38. package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
  39. package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
  40. package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +42 -12
  41. package/coverage/lcov-report/src/components/MlNavigationTools/index.html +3 -3
  42. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
  43. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.stories_.js.html +1 -1
  44. package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
  45. package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.js.html +7 -7
  46. package/coverage/lcov-report/src/components/MlScaleReference/index.html +11 -11
  47. package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
  48. package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
  49. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +1 -1
  50. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
  51. package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
  52. package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
  53. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +1 -1
  54. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
  55. package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
  56. package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
  57. package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +1 -1
  58. package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +1 -1
  59. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
  60. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
  61. package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +1 -1
  62. package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
  63. package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +1 -1
  64. package/coverage/lcov-report/src/components/MlWmsLoader/index.html +1 -1
  65. package/coverage/lcov-report/src/contexts/MapContext.tsx.html +1 -1
  66. package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
  67. package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
  68. package/coverage/lcov-report/src/contexts/index.html +1 -1
  69. package/coverage/lcov-report/src/hooks/index.html +1 -1
  70. package/coverage/lcov-report/src/hooks/useLayer.ts.html +1 -1
  71. package/coverage/lcov-report/src/hooks/useMap.ts.html +1 -1
  72. package/coverage/lcov-report/src/hooks/useMapState.ts.html +1 -1
  73. package/coverage/lcov-report/src/hooks/useWms.js.html +1 -1
  74. package/coverage/lcov-report/src/index.html +1 -1
  75. package/coverage/lcov-report/src/index.ts.html +5 -2
  76. package/coverage/lcov.info +172 -161
  77. package/dist/components/MlFollowGps/MlFollowGps.d.ts +26 -6
  78. package/dist/components/MlLayer/MlLayer.d.ts +1 -1
  79. package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +9 -0
  80. package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +1 -0
  81. package/dist/decorators/ThemeWrapper.d.ts +1 -0
  82. package/dist/index.d.ts +1 -0
  83. package/dist/index.esm.js +348 -173
  84. package/dist/index.esm.js.map +1 -1
  85. package/package.json +1 -1
  86. package/src/components/MlFollowGps/MlFollowGps.stories.js +4 -2
  87. package/src/components/MlFollowGps/MlFollowGps.tsx +53 -24
  88. package/src/components/MlLayer/MlLayer.tsx +1 -1
  89. package/src/components/MlNavigationTools/MlNavigationTools.stories.js +6 -0
  90. package/src/components/MlNavigationTools/MlNavigationTools.tsx +19 -9
  91. package/src/components/MlScaleReference/MlScaleReference.stories.js +22 -24
  92. package/src/decorators/MapContextDecorator.js +9 -10
  93. package/src/decorators/MultiMapContextDecorator.js +54 -55
  94. package/src/decorators/ThemeWrapper.jsx +9 -0
  95. package/src/index.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -1,10 +1,40 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.1.57] - 2022-08-30
4
+
5
+ ### Added
6
+
7
+ - f807ffd: add export for MlScaleReference
8
+
9
+ ## [v0.1.56] - 2022-08-11
10
+
11
+ ### Added
12
+
13
+ - f72292b: add centerUserPosition option flag to MlFollowGps to prevent constant recentering of the map to the users current position
14
+ - f72292b: add useFlyTo option flag to MlFollowGps to allow choosing between flyTo or setCenter as map centering function
15
+ - f72292b: add orientationConePaint option to MlFollowGps to allow overriding the orientation cone paint layer paint properties
16
+
17
+ ### Changed
18
+ - f72292b: rename MlFollowGps style option to buttonSx
19
+ - 412c363: wrap MlNavigationTools in a @MUI Box component and expose the sx property as MlNavigationTools option
20
+
21
+ ## [v0.1.55] - 2022-07-18
22
+
23
+ ### Changed
24
+
25
+ - be4fa69: make MlLayer geojson attribute optional
26
+ ## [v0.1.54] - 2022-07-18
27
+
28
+ ### Changed
29
+
30
+ - ad54e39: add geojson attribute to MlLayer component
31
+
3
32
  ## [v0.1.53] - 2022-07-18
4
33
 
5
- - 1a7ac4e: add more configuration options to MlNavigationTools
6
34
  ### Changed
7
35
 
36
+ - 1a7ac4e: add more configuration options to MlNavigationTools
37
+
8
38
  ## [v0.1.52] - 2022-07-18
9
39
 
10
40
  ### Added
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1658234772650" clover="3.2.0">
3
- <project timestamp="1658234772650" name="All files">
4
- <metrics statements="1641" coveredstatements="627" conditionals="1011" coveredconditionals="301" methods="299" coveredmethods="105" elements="2951" coveredelements="1033" complexity="0" loc="1641" ncloc="1641" packages="32" files="39" classes="39"/>
2
+ <coverage generated="1661866038562" clover="3.2.0">
3
+ <project timestamp="1661866038562" name="All files">
4
+ <metrics statements="1647" coveredstatements="630" conditionals="1016" coveredconditionals="301" methods="299" coveredmethods="105" elements="2962" coveredelements="1036" complexity="0" loc="1647" ncloc="1647" packages="32" files="39" classes="39"/>
5
5
  <package name="src">
6
6
  <metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
7
7
  <file name="index.ts" path="/home/runner/work/react-map-components-maplibre/react-map-components-maplibre/src/index.ts">
@@ -127,57 +127,63 @@
127
127
  </file>
128
128
  </package>
129
129
  <package name="src.components.MlFollowGps">
130
- <metrics statements="48" coveredstatements="30" conditionals="25" coveredconditionals="16" methods="10" coveredmethods="7"/>
130
+ <metrics statements="54" coveredstatements="32" conditionals="32" coveredconditionals="16" methods="10" coveredmethods="7"/>
131
131
  <file name="MlFollowGps.tsx" path="/home/runner/work/react-map-components-maplibre/react-map-components-maplibre/src/components/MlFollowGps/MlFollowGps.tsx">
132
- <metrics statements="48" coveredstatements="30" conditionals="25" coveredconditionals="16" methods="10" coveredmethods="7"/>
133
- <line num="65" count="11" type="stmt"/>
134
- <line num="66" count="9" type="stmt"/>
135
- <line num="71" count="9" type="stmt"/>
136
- <line num="73" count="9" type="stmt"/>
137
- <line num="74" count="9" type="stmt"/>
138
- <line num="75" count="9" type="stmt"/>
139
- <line num="76" count="9" type="stmt"/>
140
- <line num="78" count="9" type="stmt"/>
141
- <line num="80" count="0" type="cond" truecount="0" falsecount="2"/>
142
- <line num="82" count="0" type="stmt"/>
143
- <line num="88" count="0" type="cond" truecount="0" falsecount="2"/>
144
- <line num="89" count="0" type="stmt"/>
145
- <line num="90" count="0" type="stmt"/>
146
- <line num="91" count="0" type="stmt"/>
147
- <line num="96" count="9" type="stmt"/>
148
- <line num="97" count="0" type="stmt"/>
149
- <line num="98" count="0" type="stmt"/>
150
- <line num="101" count="9" type="stmt"/>
151
- <line num="102" count="2" type="cond" truecount="1" falsecount="1"/>
152
- <line num="103" count="2" type="stmt"/>
153
- <line num="105" count="0" type="stmt"/>
154
- <line num="106" count="0" type="stmt"/>
155
- <line num="107" count="0" type="stmt"/>
132
+ <metrics statements="54" coveredstatements="32" conditionals="32" coveredconditionals="16" methods="10" coveredmethods="7"/>
133
+ <line num="82" count="11" type="stmt"/>
134
+ <line num="83" count="9" type="stmt"/>
135
+ <line num="88" count="9" type="stmt"/>
136
+ <line num="89" count="9" type="stmt"/>
137
+ <line num="90" count="9" type="stmt"/>
138
+ <line num="91" count="9" type="stmt"/>
139
+ <line num="92" count="9" type="stmt"/>
140
+ <line num="93" count="9" type="stmt"/>
141
+ <line num="95" count="9" type="stmt"/>
142
+ <line num="97" count="0" type="cond" truecount="0" falsecount="2"/>
143
+ <line num="99" count="0" type="cond" truecount="0" falsecount="5"/>
144
+ <line num="100" count="0" type="cond" truecount="0" falsecount="2"/>
145
+ <line num="101" count="0" type="stmt"/>
156
146
  <line num="108" count="0" type="stmt"/>
157
- <line num="109" count="0" type="stmt"/>
158
- <line num="110" count="0" type="stmt"/>
159
147
  <line num="111" count="0" type="stmt"/>
160
- <line num="112" count="0" type="stmt"/>
161
- <line num="113" count="0" type="stmt"/>
162
- <line num="116" count="9" type="stmt"/>
163
- <line num="117" count="0" type="stmt"/>
164
- <line num="120" count="9" type="stmt"/>
165
- <line num="121" count="5" type="cond" truecount="2" falsecount="0"/>
166
- <line num="122" count="2" type="stmt"/>
167
- <line num="123" count="2" type="stmt"/>
168
- <line num="124" count="2" type="stmt"/>
169
- <line num="125" count="1" type="stmt"/>
170
- <line num="128" count="3" type="stmt"/>
171
- <line num="131" count="9" type="stmt"/>
172
- <line num="132" count="7" type="cond" truecount="2" falsecount="0"/>
173
- <line num="134" count="5" type="cond" truecount="2" falsecount="0"/>
174
- <line num="135" count="2" type="stmt"/>
175
- <line num="140" count="2" type="stmt"/>
176
- <line num="141" count="1" type="stmt"/>
177
- <line num="144" count="3" type="stmt"/>
178
- <line num="147" count="9" type="stmt"/>
179
- <line num="198" count="3" type="stmt"/>
180
- <line num="208" count="11" type="stmt"/>
148
+ <line num="113" count="0" type="cond" truecount="0" falsecount="2"/>
149
+ <line num="114" count="0" type="stmt"/>
150
+ <line num="115" count="0" type="stmt"/>
151
+ <line num="116" count="0" type="stmt"/>
152
+ <line num="121" count="9" type="stmt"/>
153
+ <line num="122" count="0" type="stmt"/>
154
+ <line num="123" count="0" type="stmt"/>
155
+ <line num="126" count="9" type="stmt"/>
156
+ <line num="127" count="2" type="cond" truecount="1" falsecount="1"/>
157
+ <line num="128" count="2" type="stmt"/>
158
+ <line num="130" count="0" type="stmt"/>
159
+ <line num="131" count="0" type="stmt"/>
160
+ <line num="132" count="0" type="stmt"/>
161
+ <line num="133" count="0" type="stmt"/>
162
+ <line num="134" count="0" type="stmt"/>
163
+ <line num="135" count="0" type="stmt"/>
164
+ <line num="136" count="0" type="stmt"/>
165
+ <line num="137" count="0" type="stmt"/>
166
+ <line num="138" count="0" type="stmt"/>
167
+ <line num="141" count="9" type="stmt"/>
168
+ <line num="142" count="0" type="stmt"/>
169
+ <line num="145" count="9" type="stmt"/>
170
+ <line num="146" count="5" type="cond" truecount="2" falsecount="0"/>
171
+ <line num="147" count="2" type="stmt"/>
172
+ <line num="148" count="2" type="stmt"/>
173
+ <line num="149" count="2" type="stmt"/>
174
+ <line num="150" count="1" type="stmt"/>
175
+ <line num="153" count="3" type="stmt"/>
176
+ <line num="155" count="3" type="stmt"/>
177
+ <line num="158" count="9" type="stmt"/>
178
+ <line num="159" count="7" type="cond" truecount="2" falsecount="0"/>
179
+ <line num="161" count="5" type="cond" truecount="2" falsecount="0"/>
180
+ <line num="162" count="2" type="stmt"/>
181
+ <line num="164" count="2" type="stmt"/>
182
+ <line num="165" count="1" type="stmt"/>
183
+ <line num="168" count="3" type="stmt"/>
184
+ <line num="171" count="9" type="stmt"/>
185
+ <line num="223" count="3" type="stmt"/>
186
+ <line num="235" count="11" type="stmt"/>
181
187
  </file>
182
188
  </package>
183
189
  <package name="src.components.MlGPXViewer">
@@ -952,39 +958,39 @@
952
958
  </file>
953
959
  </package>
954
960
  <package name="src.components.MlNavigationTools">
955
- <metrics statements="30" coveredstatements="2" conditionals="46" coveredconditionals="0" methods="8" coveredmethods="0"/>
961
+ <metrics statements="30" coveredstatements="2" conditionals="44" coveredconditionals="0" methods="8" coveredmethods="0"/>
956
962
  <file name="MlNavigationTools.tsx" path="/home/runner/work/react-map-components-maplibre/react-map-components-maplibre/src/components/MlNavigationTools/MlNavigationTools.tsx">
957
- <metrics statements="30" coveredstatements="2" conditionals="46" coveredconditionals="0" methods="8" coveredmethods="0"/>
958
- <line num="48" count="10" type="stmt"/>
959
- <line num="49" count="0" type="stmt"/>
960
- <line num="54" count="0" type="stmt"/>
963
+ <metrics statements="30" coveredstatements="2" conditionals="44" coveredconditionals="0" methods="8" coveredmethods="0"/>
964
+ <line num="54" count="10" type="stmt"/>
961
965
  <line num="55" count="0" type="stmt"/>
962
- <line num="56" count="0" type="stmt"/>
963
- <line num="72" count="0" type="stmt"/>
964
- <line num="76" count="0" type="stmt"/>
965
- <line num="77" count="0" type="cond" truecount="0" falsecount="2"/>
966
- <line num="79" count="0" type="stmt"/>
967
- <line num="82" count="0" type="cond" truecount="0" falsecount="2"/>
968
- <line num="84" count="0" type="stmt"/>
969
- <line num="88" count="0" type="stmt"/>
970
- <line num="91" count="0" type="stmt"/>
971
- <line num="92" count="0" type="cond" truecount="0" falsecount="2"/>
972
- <line num="94" count="0" type="cond" truecount="0" falsecount="2"/>
973
- <line num="95" count="0" type="stmt"/>
974
- <line num="99" count="0" type="stmt"/>
966
+ <line num="60" count="0" type="stmt"/>
967
+ <line num="61" count="0" type="stmt"/>
968
+ <line num="62" count="0" type="stmt"/>
969
+ <line num="78" count="0" type="stmt"/>
970
+ <line num="82" count="0" type="stmt"/>
971
+ <line num="83" count="0" type="cond" truecount="0" falsecount="2"/>
972
+ <line num="85" count="0" type="stmt"/>
973
+ <line num="88" count="0" type="cond" truecount="0" falsecount="2"/>
974
+ <line num="90" count="0" type="stmt"/>
975
+ <line num="94" count="0" type="stmt"/>
976
+ <line num="97" count="0" type="stmt"/>
977
+ <line num="98" count="0" type="cond" truecount="0" falsecount="2"/>
975
978
  <line num="100" count="0" type="cond" truecount="0" falsecount="2"/>
976
- <line num="102" count="0" type="cond" truecount="0" falsecount="2"/>
977
- <line num="103" count="0" type="stmt"/>
978
- <line num="107" count="0" type="stmt"/>
979
+ <line num="101" count="0" type="stmt"/>
980
+ <line num="105" count="0" type="stmt"/>
981
+ <line num="106" count="0" type="cond" truecount="0" falsecount="2"/>
979
982
  <line num="108" count="0" type="cond" truecount="0" falsecount="2"/>
980
- <line num="110" count="0" type="stmt"/>
981
- <line num="111" count="0" type="cond" truecount="0" falsecount="2"/>
982
- <line num="112" count="0" type="stmt"/>
983
- <line num="114" count="0" type="stmt"/>
984
- <line num="117" count="0" type="stmt"/>
985
- <line num="149" count="0" type="stmt"/>
986
- <line num="152" count="0" type="stmt"/>
987
- <line num="182" count="10" type="stmt"/>
983
+ <line num="109" count="0" type="stmt"/>
984
+ <line num="113" count="0" type="stmt"/>
985
+ <line num="114" count="0" type="cond" truecount="0" falsecount="2"/>
986
+ <line num="116" count="0" type="stmt"/>
987
+ <line num="117" count="0" type="cond" truecount="0" falsecount="2"/>
988
+ <line num="118" count="0" type="stmt"/>
989
+ <line num="120" count="0" type="stmt"/>
990
+ <line num="123" count="0" type="stmt"/>
991
+ <line num="155" count="0" type="stmt"/>
992
+ <line num="158" count="0" type="stmt"/>
993
+ <line num="188" count="10" type="stmt"/>
988
994
  </file>
989
995
  </package>
990
996
  <package name="src.components.MlOsmLayer">
@@ -1013,10 +1019,10 @@
1013
1019
  </file>
1014
1020
  </package>
1015
1021
  <package name="src.components.MlScaleReference">
1016
- <metrics statements="48" coveredstatements="0" conditionals="26" coveredconditionals="0" methods="7" coveredmethods="0"/>
1022
+ <metrics statements="48" coveredstatements="1" conditionals="26" coveredconditionals="0" methods="7" coveredmethods="0"/>
1017
1023
  <file name="MlScaleReference.js" path="/home/runner/work/react-map-components-maplibre/react-map-components-maplibre/src/components/MlScaleReference/MlScaleReference.js">
1018
- <metrics statements="48" coveredstatements="0" conditionals="26" coveredconditionals="0" methods="7" coveredmethods="0"/>
1019
- <line num="4" count="0" type="stmt"/>
1024
+ <metrics statements="48" coveredstatements="1" conditionals="26" coveredconditionals="0" methods="7" coveredmethods="0"/>
1025
+ <line num="4" count="10" type="stmt"/>
1020
1026
  <line num="5" count="0" type="stmt"/>
1021
1027
  <line num="6" count="0" type="stmt"/>
1022
1028
  <line num="8" count="0" type="stmt"/>