react-leaflet-greatcircle

1.0.2 • Public • Published

react-leaflet-greatcircle

Installation

It requires React, Leaflet and react-leaflet to be installed.

npm install react-leaflet-greatcircle

Usage

import React from 'react';
import { Map, TileLayer } from 'react-leaflet';

import GreatCircle from 'react-leaflet-greatcircle';

const position = [51.505, -0.09];

export default () => (
  <Map center={position} zoom={1} style={{ height: 300, width: 800 }}>
    <TileLayer
      attribution='&amp;copy <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
      url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
    />
    <GreatCircle
      center={position}
      radius={100000} /* In meters */
      fill={false}
      /* You can pass all classic properties of Circle */
    />
  </Map>
);

Readme

Keywords

none

Package Sidebar

Install

npm i react-leaflet-greatcircle

Weekly Downloads

13

Version

1.0.2

License

ISC

Unpacked Size

48.5 kB

Total Files

7

Last publish

Collaborators

  • ntag