@onaio/gisida-lite
v0.0.2
Published
Mininimal map wrapper for MAPBOX GL JS
Downloads
5
Readme
GisidaLite
A simple React
component that takes react-mapbox-gl configurations and outputs a map based on configurations provided.
Why is this useful?
GisidaLite
helps to keep code DRY - use it every time you want to render maps on a react app. The package aims to avoid duplication of efforts whilst saving time when building maps on the web.
A basic understanding of react-mapbox-gl terminologies is needed to use this library:
Package Configurations: To get your map up and running. The following configurations are needed.
interface GisidaLiteProps {
reactMapboxGlMapFactoryUtilConfigs: FactoryParameters;
mapConfigs: Props & Events;
mapComponents: JSX.Element[];
layers: JSX.Element[];
}
- reactMapboxGlMapFactoryUtilConfigs - FactoryParameters - Factory parameters for ReactMapboxGl method that returns a map component.
- mapConfigs - Component properties. The component takes map settings and event handlers as listed here
- mapComponents - Custom Map components. Should be passed to the component as a list. More info on this can be found here
- layers - layers prop holds layers and associated sources. The prop expects a list. More info on Layers can be found on the links below