oz-map
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

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;
}

Readme

Keywords

none

Package Sidebar

Install

npm i oz-map

Weekly Downloads

0

Version

1.0.8

License

none

Unpacked Size

3.27 MB

Total Files

6

Last publish

Collaborators

  • ozzz