1 | import L from "leaflet";
|
2 | import { GeodesicOptions } from "./geodesic-core";
|
3 | import { GeodesicGeometry, Statistics } from "./geodesic-geom";
|
4 |
|
5 |
|
6 |
|
7 | export declare class GeodesicLine extends L.Polyline {
|
8 |
|
9 | defaultOptions: GeodesicOptions;
|
10 |
|
11 | readonly geom: GeodesicGeometry;
|
12 |
|
13 | statistics: Statistics;
|
14 |
|
15 | points: L.LatLng[][];
|
16 | constructor(latlngs?: L.LatLngExpression[] | L.LatLngExpression[][], options?: GeodesicOptions);
|
17 | /** calculates the geodesics and update the polyline-object accordingly */
|
18 | private updateGeometry;
|
19 | /**
|
20 | * overwrites the original function with additional functionality to create a geodesic line
|
21 | * @param latlngs an array (or 2d-array) of positions
|
22 | */
|
23 | setLatLngs(latlngs: L.LatLngExpression[] | L.LatLngExpression[][]): this;
|
24 | /**
|
25 | * add a given point to the geodesic line object
|
26 | * @param latlng point to add. The point will always be added to the last linestring of a multiline
|
27 | * @param latlngs define a linestring to add the new point to. Read from points-property before (e.g. `line.addLatLng(Beijing, line.points[0]);`)
|
28 | */
|
29 | addLatLng(latlng: L.LatLngExpression, latlngs?: L.LatLng[]): this;
|
30 | /**
|
31 | * Creates geodesic lines from a given GeoJSON-Object.
|
32 | * @param input GeoJSON-Object
|
33 | */
|
34 | fromGeoJson(input: GeoJSON.GeoJSON): this;
|
35 | /**
|
36 | * Calculates the distance between two geo-positions
|
37 | * @param start 1st position
|
38 | * @param dest 2nd position
|
39 | * @return the distance in meters
|
40 | */
|
41 | distance(start: L.LatLngExpression, dest: L.LatLngExpression): number;
|
42 | }
|