@mapcomponents/react-maplibre 0.1.9 → 0.1.13
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/.github/ISSUE_TEMPLATE/bug_report.md +2 -2
- package/.github/ISSUE_TEMPLATE/feature_request.md +3 -3
- package/.github/workflows/node_version_test.yml +25 -0
- package/.github/workflows/storybook.yml +6 -3
- package/CONTRIBUTING.md +2 -2
- package/README.md +3 -7
- package/coverage/clover.xml +748 -625
- package/coverage/coverage-final.json +19 -14
- package/coverage/lcov-report/block-navigation.js +8 -0
- package/coverage/lcov-report/index.html +170 -104
- package/coverage/lcov-report/sorter.js +26 -0
- package/coverage/lcov-report/{components → src/components}/MapLibreMap/MapLibreMap.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MapLibreMap/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlCreatePdfButton/MlCreatePdfButton.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlCreatePdfButton/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFeatureEditor/MlFeatureEditor.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFeatureEditor/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFillExtrusionLayer/MlFillExtrusionLayer.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFillExtrusionLayer/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFollowGps/MlFollowGps.js.html +99 -48
- package/coverage/lcov-report/{components → src/components}/MlFollowGps/index.html +27 -21
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/MlGPXViewer.js.html +73 -61
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/gpxConverter.js.html +56 -71
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/index.html +32 -26
- package/coverage/lcov-report/{components → src/components}/MlGeoJsonLayer/MlGeoJsonLayer.js.html +91 -31
- package/coverage/lcov-report/{components → src/components}/MlGeoJsonLayer/index.html +35 -29
- package/coverage/lcov-report/{components → src/components}/MlImageMarkerLayer/MlImageMarkerLayer.js.html +26 -23
- package/coverage/lcov-report/{components → src/components}/MlImageMarkerLayer/index.html +26 -20
- package/coverage/lcov-report/{components → src/components}/MlLayer/MlLayer.js.html +37 -31
- package/coverage/lcov-report/{components → src/components}/MlLayer/index.html +33 -27
- package/coverage/lcov-report/{components → src/components}/MlLayerMagnify/MlLayerMagnify.js.html +48 -42
- package/coverage/lcov-report/{components → src/components}/MlLayerMagnify/index.html +31 -25
- package/coverage/lcov-report/{components → src/components}/MlLayerSwipe/MlLayerSwipe.js.html +45 -42
- package/coverage/lcov-report/{components → src/components}/MlLayerSwipe/index.html +31 -25
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +755 -0
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +380 -0
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +117 -0
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +117 -0
- package/coverage/lcov-report/{components → src/components}/MlMarker/MlMarker.js.html +18 -12
- package/coverage/lcov-report/{components → src/components}/MlMarker/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlNavigationCompass/MlNavigationCompass.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlNavigationCompass/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlNavigationTools/MlNavigationTools.js.html +55 -37
- package/coverage/lcov-report/{components → src/components}/MlNavigationTools/index.html +23 -17
- package/coverage/lcov-report/{components → src/components}/MlOsmLayer/MlOsmLayer.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlOsmLayer/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlScaleReference/MlScaleReference.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlScaleReference/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlShareMapState/MlShareMapState.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlShareMapState/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlSpatialElevationProfile/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlThreeJsLayer/MlThreeJsLayer.js.html +37 -55
- package/coverage/lcov-report/{components → src/components}/MlThreeJsLayer/index.html +31 -25
- package/coverage/lcov-report/{components → src/components}/MlUseMapDebugger/MlUseMapDebugger.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlUseMapDebugger/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlVectorTileLayer/MlVectorTileLayer.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlVectorTileLayer/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlWmsFeatureInfoPopup/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlWmsLayer/MlWmsLayer.js.html +20 -14
- package/coverage/lcov-report/{components → src/components}/MlWmsLayer/index.html +21 -15
- package/coverage/lcov-report/{components → src/components}/MlWmsLoader/MlWmsLoader.js.html +38 -20
- package/coverage/lcov-report/{components → src/components}/MlWmsLoader/index.html +23 -17
- package/coverage/lcov-report/{hooks → src/hooks}/index.html +17 -11
- package/coverage/lcov-report/{hooks → src/hooks}/useMap.js.html +17 -11
- package/coverage/lcov-report/{hooks → src/hooks}/useMapState.js.html +17 -11
- package/coverage/lcov-report/{hooks → src/hooks}/useWms.js.html +25 -19
- package/coverage/lcov-report/src/i18n.js.html +167 -0
- package/coverage/lcov-report/src/index.html +117 -0
- package/coverage/lcov-report/src/translations/english.js.html +95 -0
- package/coverage/lcov-report/src/translations/german.js.html +95 -0
- package/coverage/lcov-report/src/translations/index.html +132 -0
- package/coverage/lcov.info +1278 -1010
- package/dist/b556faa3bc6829d2.png +0 -0
- package/dist/index.esm.js +170 -109
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -1
- package/public/assets/dop.png +0 -0
- package/public/assets/historic.png +0 -0
- package/public/assets/osm.png +0 -0
- package/public/thumbnails/MlFollowGps.png +0 -0
- package/public/thumbnails/MlThreeJsLayer.png +0 -0
- package/rollup.config.js +10 -2
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.js +58 -73
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.meta.json +1 -1
- package/src/components/MlFeatureEditor/MlFeatureEditor.meta.json +2 -2
- package/src/components/MlFollowGps/MlFollowGps.js +46 -31
- package/src/components/MlFollowGps/MlFollowGps.meta.json +2 -2
- package/src/components/MlFollowGps/assets/marker.png +0 -0
- package/src/components/MlGPXViewer/MlGPXViewer.js +45 -43
- package/src/components/MlGPXViewer/gpxConverter.js +22 -29
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.js +27 -9
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.meta.json +1 -1
- package/src/components/MlGeoJsonLayer/util/transitionFunctions.js +19 -12
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.js +3 -4
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.test.js +6 -7
- package/src/components/MlLayer/MlLayer.js +2 -2
- package/src/components/MlLayer/MlLayer.test.js +12 -10
- package/src/components/MlLayerMagnify/MlLayerMagnify.js +3 -3
- package/src/components/MlLayerSwipe/MlLayerSwipe.js +4 -5
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.css +17 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.doc.de.md +3 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.js +223 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.meta_.json +15 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.stories.js +106 -0
- package/src/components/MlLayerSwitcher/assets/sample_1.json +26 -0
- package/src/components/MlLayerSwitcher/assets/sample_2.json +22 -0
- package/src/components/MlLayerSwitcher/components/LayerBox.js +98 -0
- package/src/components/MlMarker/MlMarker.js +1 -1
- package/src/components/MlNavigationTools/MlNavigationTools.js +26 -22
- package/src/components/MlScaleReference/MlScaleReference.meta.json +1 -1
- package/src/components/MlScaleReference/MlScaleReference.stories.js +25 -21
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.js +12 -6
- package/src/components/MlThreeJsLayer/MlThreeJsLayer.js +8 -15
- package/src/components/MlVectorTileLayer/MlVectorTileLayer.meta.json +3 -3
- package/src/components/MlWmsLayer/MlWmsLayer.js +1 -1
- package/src/components/MlWmsLoader/MlWmsLoader.js +8 -4
- package/src/components/MlWmsLoader/MlWmsLoader.meta.json +1 -1
- package/src/components/MlWmsLoader/MlWmsLoader.stories.js +5 -4
- package/src/decorators/EmptyMapContextDecorator.js +11 -6
- package/src/decorators/MapContext3DDecorator.js +25 -20
- package/src/decorators/MapContextDashboardDecorator.js +7 -7
- package/src/decorators/MapContextDecorator.js +7 -8
- package/src/decorators/MapContextKlokantechBasicDecorator.js +8 -9
- package/src/decorators/MultiMapContextDecorator.js +2 -6
- package/src/hooks/useMapState.stories.js +7 -2
- package/src/hooks/useWms.js +7 -6
- package/src/i18n.js +28 -0
- package/src/translations/english.js +4 -0
- package/src/translations/german.js +4 -0
- package/src/ui_components/ImageLoader.js +73 -0
- package/src/ui_components/Sidebar.js +76 -22
- package/src/ui_components/TopToolbar.js +18 -18
|
@@ -9,10 +9,10 @@ labels: 'Status: Unconfirmed'
|
|
|
9
9
|
<!--
|
|
10
10
|
Please provide a clear and concise description of what the bug is. Include
|
|
11
11
|
screenshots if needed. Please test using the latest version of the relevant
|
|
12
|
-
react-
|
|
12
|
+
@mapcomponents/react-maplibre package to make sure your issue has not already been fixed.
|
|
13
13
|
-->
|
|
14
14
|
|
|
15
|
-
react-
|
|
15
|
+
@mapcomponents/react-maplibre version:
|
|
16
16
|
|
|
17
17
|
## Steps To Reproduce
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: "
|
|
3
|
-
about: Suggest a new idea for react-
|
|
2
|
+
name: "💕 Feature request"
|
|
3
|
+
about: Suggest a new idea for @mapcomponents/react-maplibre.
|
|
4
4
|
title: 'Feature: '
|
|
5
5
|
labels: 'Status: needs print'
|
|
6
6
|
Assignees: ''
|
|
@@ -11,7 +11,7 @@ Assignees: ''
|
|
|
11
11
|
-->
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
react-
|
|
14
|
+
@mapcomponents/react-maplibre version:
|
|
15
15
|
|
|
16
16
|
## Feature description
|
|
17
17
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
pull_request:
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
node-versions: [10.x, 12.x, 14.x, 15.x, 16.x]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v2
|
|
19
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
20
|
+
# Setup .npmrc file to publish to npm
|
|
21
|
+
uses: actions/setup-node@v2
|
|
22
|
+
with:
|
|
23
|
+
node-version: ${{ matrix.node-version }}
|
|
24
|
+
- run: yarn
|
|
25
|
+
- run: yarn test:noninteractive
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name: Build and
|
|
1
|
+
name: Build and deploy storybook
|
|
2
2
|
on:
|
|
3
3
|
[push]
|
|
4
4
|
jobs:
|
|
@@ -9,10 +9,13 @@ jobs:
|
|
|
9
9
|
uses: actions/checkout@v2.3.1
|
|
10
10
|
with:
|
|
11
11
|
persist-credentials: false
|
|
12
|
-
- name: Install and
|
|
12
|
+
- name: Install and build 🔧
|
|
13
13
|
run: | # Install packages and build the Storybook files
|
|
14
|
-
yarn
|
|
14
|
+
yarn
|
|
15
|
+
yarn build-catalogue-meta
|
|
16
|
+
yarn build-catalogue-markdown-docs
|
|
15
17
|
yarn build-storybook
|
|
18
|
+
npx sb extract ./docs-build ./docs-build/stories.json
|
|
16
19
|
- name: Deploy 🚀
|
|
17
20
|
uses: JamesIves/github-pages-deploy-action@3.6.2
|
|
18
21
|
with:
|
package/CONTRIBUTING.md
CHANGED
|
@@ -71,7 +71,7 @@ Depending on how large the project is, you may want to outsource the questioning
|
|
|
71
71
|
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
|
|
72
72
|
|
|
73
73
|
- Make sure that you are using the latest version.
|
|
74
|
-
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](). If you are looking for support, you might want to check [this section](#i-have-a-question)).
|
|
74
|
+
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://mapcomponents.github.io/react-map-components-maplibre/). If you are looking for support, you might want to check [this section](#i-have-a-question)).
|
|
75
75
|
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/mapcomponents/react-map-components-maplibre/issues?q=label%3Abug).
|
|
76
76
|
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
|
|
77
77
|
- Collect information about the bug:
|
|
@@ -111,7 +111,7 @@ This section guides you through submitting an enhancement suggestion for react-m
|
|
|
111
111
|
#### Before Submitting an Enhancement
|
|
112
112
|
|
|
113
113
|
- Make sure that you are using the latest version.
|
|
114
|
-
- Read the [documentation]() carefully and find out if the functionality is already covered, maybe by an individual configuration.
|
|
114
|
+
- Read the [documentation](https://mapcomponents.github.io/react-map-components-maplibre) carefully and find out if the functionality is already covered, maybe by an individual configuration.
|
|
115
115
|
- Perform a [search](https://github.com/mapcomponents/react-map-components-maplibre/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
|
116
116
|
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
|
|
117
117
|
|
package/README.md
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://badge.fury.io/js/@mapcomponents%2Freact-maplibre) [](https://opensource.org/licenses/MIT)  
|
|
6
6
|
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
|
|
7
10
|
## Getting started (Using the storybook dev server)
|
|
8
11
|
|
|
9
12
|
1. Clone the repository and ```cd``` into the folder
|
|
@@ -146,13 +149,6 @@ Example implementation of a component in context with all required dependent com
|
|
|
146
149
|
|
|
147
150
|
More information on writing storybook stories for react components: https://storybook.js.org/docs/react/get-started/browse-stories
|
|
148
151
|
|
|
149
|
-
## LoadingOverlay and LoadingOverlayProvider (currently located in ./ui_components/)
|
|
150
|
-
|
|
151
|
-
The loading overlay component is added in the storybook decorator.
|
|
152
|
-
Without any further configuration it will listen for new MapLibre instances registered in MapContext and fade out once all of them have fired an "idle" event. For more precise control the LoadingOverlayContext provides a ```loadingOverlayContext.setControlled(true)``` function that will, if called with true as first parameter, switch the LoadingOverlay to manual control. Once the application has loaded completely call the ```loadingOverlayContext.setLoadingDone(true)``` function to trigger the LoadingOverlay Component to fade out.
|
|
153
|
-
|
|
154
|
-
For decorator integration examples check the storybook decorators located in ./decorators/.
|
|
155
|
-
|
|
156
152
|
# Tests
|
|
157
153
|
|
|
158
154
|
```
|