Comments (5)
More specifically, for example, how does one import and use MlLayerSwitcher? I assume this is a legend control component?
import {
MlLayerSwitcher,
MapLibreMap,
MlNavigationTools,
MlGeoJsonLayer,
useMap,
} from "@mapcomponents/react-maplibre";
index.js:1 ./src/App.js
Attempted import error: 'MlLayerSwitcher' is not exported from '@mapcomponents/react-maplibre'.
from react-map-components-maplibre.
Hi @openSourcerer9000 thank you for your messages.
Sadly we got some problems with our codesandbox templates since maplibre-gl switched to Typescript it is no longer possible to install npm modules that use maplibre-gl as a dependency. We are looking for a fix, it appears to be something related to the way maplibre-gl has integrated the service-worker code within the npm module.
The MlLayerswitcher component is not yet exported by the module since it is still experimental.
I recommend our storybook for browsing through existing components (I see you are using that already) https://mapcomponents.github.io/react-map-components-maplibre
And using our create-react-app template to get started with developing a project.
npx create-react-app@latest app_name --template=@mapcomponents/cra-template
I will give a more detailed answer in the other issue you opened.
We are working on the documentation. The important components have a quite complete documentation of attributes (e.g. https://mapcomponents.github.io/react-map-components-maplibre/?path=/docs/mapcomponents-mlgeojsonlayer--linestring). Other components are poorly or not documented yet, usually ones that are still in a proof of concept stage. We are aiming to overhaul the documentation especially regarding an easy entry soon.
from react-map-components-maplibre.
The storybooks don't provide much help - they show settings without showing the underlying code.
from react-map-components-maplibre.
The storybook and catalogue are still work in progress.
The storybook is currently providing documentation for component attributes on the docs tab.
Though the code samples shown in the docs tab are sometimes unrelated since they sometimes show the decorator code for component stories instead of the actual story code. Also the documentation of important hook such as useMap is missing in there. We'll fix that and get back to you.
from react-map-components-maplibre.
We have improved the documentation a lot, although it is not complete yet.
The code examples in the storybook docs tab have been improved on most components to show more relevant code.
I will close this issue for now, still we are determined to constantly improve the documentation and make the project as accessible as possible.
from react-map-components-maplibre.
Related Issues (15)
- Feature: Add implicit layer types to MlGeoJsonLayer HOT 1
- Bug: WMS FeatureInfo does not work on tilted map HOT 1
- What is this? HOT 2
- Bug: xmldom Security risk, depreciated, HOT 2
- Bug: Navigation Compass does not work in Dark Mode HOT 4
- Bug: MlSketchTool is not listed as dependency HOT 2
- Geojson layer now causing infinite loop HOT 2
- setTerrain is missing HOT 14
- Bug: cypress should be a devDependency HOT 1
- Bug: maplibregl-ctrl-bottom-right styles are broken since v1.0.0 HOT 4
- Question: setData() implementation with useEffect() HOT 5
- Feature: Provide a new GeoJsonLayer component that allows the defininition of multiple layers for the geojson source created by the component HOT 1
- Invalid hook call occurred in MapComponentsProvider HOT 3
- package.json has invalid "main" entry HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-map-components-maplibre.