install using npm install oz-map
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} />
#map {
height: 100vh;
width: 100%;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
}