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.
- 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
Make sure you have Node.js installed (Node 18 recommended). Install the package using:
npm install react-geojson-map
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;
- Clone the repository:
git clone https://github.com/behoney/react-geojson-map.git
- Install dependencies:
pnpm install
pnpm test
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.
MIT © behoney