0.6.1 • Published 3 years ago

r-atlas v0.6.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

React Atlas

WORK IN PROGRESS. DO NOT USE!

npm version

React wrapper of Openlayers written in TypeScript.

Installation

# using yarn
yarn add r-atlas

# using npm
npm install r-atlas

Development

Build project with watcher

yarn build:watch

Usage

Display simple map:

import { MapContainer, TileLayer } from 'r-atlas'
const Map = () => {
  return (
    <MapContainer center={[0, 0]} zoom={12} style={{ width: 600, height: 300 }}>
    <TileLayer source="OSM" />
  </MapContainer>
  )
}

Using openlayers object:

import { MapContainer, TileLayer, useMap } from 'r-atlas'
const SubComponent = () => {
  const { map } = useMap()
  // you can access the openlayers object via using useMap hook
  return <div>I'm sub</div>
}

const Map = () => {
  return (
    <MapContainer center={[0, 0]} zoom={12} style={{ width: 600, height: 300 }}>
    <TileLayer source="OSM" />
  </MapContainer>
  )
}

Contributing

See the CONTRIBUTING file.

0.6.1

3 years ago

0.6.0

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago