OL Map wrapper for make your life easier
We working on live demo, give us little more time!
OL Map wrapper is available as an npm package.
// With npm
npm install @sigeo/ol-map-management
// With yarn
yarn add @sigeo/ol-map-management
Here is a quick example to get you started, it's all you need:
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';
import Map from '@sigeo/ol-map-management';
class App extends PureComponent {
componentDidMount () {
Map.create({
target: 'map',
view: new View({
zoom: config.map.zoom
})
});
}
render () {
return (
...
<div id="map" />
...
)
}
}
ReactDOM.render(<App />, document.querySelector('#app'));
Copyright © 2019 Sigeo S.R.L
Licensed under a GPL3+ license: http://www.gnu.org/licenses/gpl-3.0.txt