1.0.0 • Published 1 year ago

reactjs-map v1.0.0

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

REACTJS-MAP

A React component library providing dynamic map functionality with Leaflet

Table of Contents

  1. Installation
  2. Feature
  3. Usage
  4. Dynamic Control
  5. License

Installation

Open a terminal or command prompt and run:

Using npm:

$ npm i reactjs-map

Using yarn:

$ yarn add reactjs-map

Using pnpm:

$ pnpm add reactjs-map

You should see the reactjs-map in your package.json

Features

  • Easy to Use
  • Multiple Map Views
  • Animation
  • Dynamic Control
  • Customizable
  • Extensive Integration
  • High Performance

Usage

import {GetLatLng} from 'reactjs-map';

const App = () => {
  const [location, setLocation] = useState<{ lat: number | null; lng: number | null }>({
    lat: null,
    lng: null,
  })

  return (
    <GetLatLng
      location={location}
      setLocation={setLocation}
      height='100vh'
      width='100vw'
      animation='flyTo'
      animationDuration={2}
      enableConfirmation={true}
      defaultView='google'
    />
  )
}

Dynamic Control

  1. Control for GetLatLng Component
interface IGetLatLong {
  location: { lat: number; lng: number }
  setLocation: (location: { lat: number; lng: number }) => void
  height: string
  width: string
  animation?: 'flyTo' | 'boxZoom'
  animationDuration?: number
  enableConfirmation?: boolean
  defaultView?: 'openStreet' | 'satellite' | 'google'
}

License

MIT

1.0.0

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago