react-geojson-map
v0.2.0
Published
A library for declarative geospatial visualization using React Fiber and OpenLayers
Downloads
94
Maintainers
Readme
React Geojson Map
This is under development and not yet ready for production use.
react-geojson-map is a library that enables declarative geospatial visualization using React Fiber. It seamlessly integrates React's component-based architecture with OpenLayers' mapping capabilities, providing developers with a robust solution for creating interactive and efficient map-based applications.
Features
- Declarative components for defining map layers, sources, and interactions using JSX
- CSS styling support for dynamic and themeable vector layer styling
- Data source injection for streamlined integration and management of geospatial data sources
Installation
Make sure you have Node.js installed (Node 18 recommended). Install the package using:
npm install react-geojson-map
Usage
Here's a basic example of how to use react-geojson-map:
import React from "react";
import { GeoMap, GeoDataSource } from "react-geojson-map";
const MyMap = () => (
<GeoMap>
<GeoDataSource url="path/to/geojson" />
{/* Add other map components */}
</GeoMap>
);
export default MyMap;
Development
Setup
- Clone the repository:
git clone https://github.com/behoney/react-geojson-map.git
- Install dependencies:
pnpm install
Run tests
pnpm test
Contributing
Contributions are welcome! Please open issues and submit pull requests for any enhancements or bug fixes. Make sure your code follows the project's coding standards and includes appropriate tests.
License
MIT © behoney