@jezpoz/react-openlayers
v0.0.1
Published
A React wrapper for OpenLayers
Downloads
1
Readme
React Openlayers
:warning: This is still work in progress: Very limited functionality!
Repo heavily inspired by react-openlayers made by Allen Kim
Usage
import { Map, Layers } from "react-overlays";
import TileLayer from "ol/layer/Tile";
import OSM from "ol/source/OSM";
import View from "ol/View";
export default function App() {
const view = new View({ center: [0, 0], zoom: 2 });
const layer = new TileLayer({
source: new OSM(),
});
return (
<Map view={view} width={"100%"} height={"600px"}>
<Layers.Tile layer={layer} />
</Map>
);
}
Wanna test it out?
Feel free to clone the repository, if there is any issues, feel free to report them here
git clone https://github.com/jezpoz/react-openlayers
cd react-openlayers
npm i
npm run dev