1.0.6 • Published 4 years ago

canibuild-leaflet-component v1.0.6

Weekly downloads
239
License
MIT
Repository
github
Last release
4 years ago

canibuild-leaflet-component

Canibuild react leaflet drawing tool component

NPM JavaScript Style Guide

Install

npm install --save canibuild-leaflet-component

Usage

import React from 'react'

import MapContainer from 'canibuild-leaflet-component'
import 'canibuild-leaflet-component/dist/index.css'

const Example = () => {
  const position = [51.505, -0.09]
  return (
    <MapContainer center={position} zoom={13} scrollWheelZoom={false}>
      <TileLayer
        attribution='&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
        url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
      />
      <Marker position={position}>
        <Popup>
          A pretty CSS3 popup. <br /> Easily customizable.
        </Popup>
      </Marker>
    </MapContainer>
  )
}

License

MIT © hoanphi2201