Skip to content

nickdutto/react-gis

Repository files navigation

GitHub Actions Workflow - Release Status GitHub License NPM Version GitHub Repo stars

ReactGIS

React wrapper for OpenLayers.

Documentation Storybook

Getting Started

Installation

Install via your preferred package manager

npm i @react-gis/openlayers
pnpm add @react-gis/openlayers
yarn add @react-gis/openlayers

Basic Usage

Basic map with OpenStreetMap:

import { View } from "ol";
import { OSM } from "ol/source";

import { TileLayer } from "@react-gis/openlayers/layer";
import { Map } from "@react-gis/openlayers/map";

import "ol/ol.css";

function App() {
  return (
    <Map
      mapOptions={{ view: new View({ center: [0, 0], zoom: 4 }) }}
      style={{ width: "100%", height: "100%" }}
    >
      <TileLayer name="osm" source={new OSM()} />
    </Map>
  );
}

About

ReactGIS - React wrapper for OpenLayers

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors