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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    107
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    107
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i react-leaflet-greatcircle

Weekly Downloads

108

Version

1.0.2

License

ISC

Unpacked Size

48.5 kB

Total Files

7

Last publish

Collaborators

  • ntag