New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

Leaflet.GreatCircle

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Leaflet.GreatCircle

Draw accurately projected circles on a leaflet map

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Leaflet.GreatCircle

Draw accurately projected circles on Leaflet maps.

Why?

The existing L.Circle functionality draws a plain geometric circle on the map. However, due to the nature of map projections, this in not an accurate way to represent a circle on a sphere.

Our shape computes the multipolygon boundary that includes the points on a globe having a distance to "center" less than "radius".

We determine the lat/lon of each bearing around the compass at that distance using the the geodesy library by Chris Veness.

Installation

Since leaflet doesn't play well without a browser, you're likely using bower. In this case, just bower install Leaflet.GreatCircle.

We do also support node, though, so you can npm install Leaflet.GreatCircle.

Usage

L.greatCircle(centerLatLng, radiusInMeters, { fill : 'red' }).addTo(map);

FAQs

Package last updated on 22 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc