Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-geometryutil

Package Overview
Dependencies
Maintainers
6
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-geometryutil - npm Package Compare versions

Comparing version 0.10.1 to 0.10.2

2

package.json
{
"name": "leaflet-geometryutil",
"version": "0.10.1",
"version": "0.10.2",
"description": "Leaflet utility functions on geometries",

@@ -5,0 +5,0 @@ "keywords": [

@@ -50,2 +50,7 @@ Leaflet.GeometryUtil

### 0.10.2 ###
* use leaflet's earth radius in destination function (#96, thanks to @viliusstanga)
* Changed imports to acommodate to new ngx-leaflet organization (#97, thanks to @rtrevinnoc)
### 0.10.1 ###

@@ -52,0 +57,0 @@

describe('Destination', function() {
var radius = L.CRS.Earth.R;
it('It should be [90.0,0.0]', function(done) {
var latlng1 = L.latLng([0.0, 0.0]),
heading = 0.0;
dist = 6378137 * Math.PI / 2.0; // 1/4 Earth's circumference.
dist = radius * Math.PI / 2.0; // 1/4 Earth's circumference.
result = L.latLng([90.0,0.0]);

@@ -15,3 +17,3 @@ assert.latLngEqual(result, L.GeometryUtil.destination(latlng1, heading, dist));

heading = -90.0;
dist = 6378137 * Math.PI / 8.0;
dist = radius * Math.PI / 8.0;
result = L.latLng([0.0, 162.5]);

@@ -25,3 +27,3 @@ assert.latLngEqual(result, L.GeometryUtil.destination(latlng1, heading, dist));

heading = 134.5614514132577;
dist = 3140555.3283872544;
dist = 3137041.1135971523;
result = L.latLng([-10, 10.0]);

@@ -28,0 +30,0 @@ assert.latLngEqual(result, L.GeometryUtil.destination(latlng1, heading, dist));

@@ -1,2 +0,3 @@

import L, { LatLngLiteral, Layer } from "leaflet";
import * as L from "leaflet";
import { LatLngLiteral, Layer } from "leaflet"

@@ -3,0 +4,0 @@ interface LayerPointRelation<LayerType extends Layer = Layer> {

@@ -717,3 +717,3 @@ // Packaging/modules magic dance.

radInv = 180 / Math.PI,
R = 6378137, // approximation of Earth's radius
R = L.CRS.Earth.R, // approximation of Earth's radius
lon1 = latlng.lng * rad,

@@ -720,0 +720,0 @@ lat1 = latlng.lat * rad,

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