1.0.8 • Published 2 years ago
oz-map v1.0.8
react map module
install
install using npm install oz-map
usage
in a react app, use the Map components:
import { Map } from "oz-map";
let mapRef = React.createRef()
return <Map ref={mapRef}
    view={{
        projection: 'EPSG:3857',
        center: [4000000, 4700000],
        zoom: 8,
    }}
    handleInfo={(event) => {
        alert(event.feature.getGeometry().getCoordinates());
    }}
/>or
let mapRef2 = React.createRef()
return <Map id="map2" ref={mapRef2} />css
#map {
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}