0.0.2 • Published 3 years ago

@onaio/gisida-lite v0.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

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[];
}
  1. reactMapboxGlMapFactoryUtilConfigs - FactoryParameters - Factory parameters for ReactMapboxGl method that returns a map component.
  2. mapConfigs - Component properties. The component takes map settings and event handlers as listed here
  3. mapComponents - Custom Map components. Should be passed to the component as a list. More info on this can be found here
  4. layers - layers prop holds layers and associated sources. The prop expects a list. More info on Layers can be found on the links below