@daviking/openlayers
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

React - OpenLayers

Do not try this at home, this is made for custom needs and not battle tested.

This library brings a lightweight abstraction over open layers to allow for simpler usage in a react application.

Credits

Credits goes to https://github.com/mbrown3321/openlayers-react-map, from which I took the initial code.

Example usage

import React, { FC } from 'react';
import { Layers, Map, TileLayer, View } from 'react-openlayers';
import OSM from 'ol/source/OSM';

const App: FC = () => <Map>
  <View options={{ center: [0, 0], zoom: 2 }} />
  <Layers>
    <TileLayer options={{ source: new OSM() }} />
  </Layers>
</Map>

Readme

Keywords

none

Package Sidebar

Install

npm i @daviking/openlayers

Weekly Downloads

8

Version

1.3.1

License

MIT

Unpacked Size

1.09 MB

Total Files

48

Last publish

Collaborators

  • davikingcode