forked from MapComplete/MapComplete
UX(nearby_features): place nearby panorama markers at nearly the right place
This commit is contained in:
parent
9135f1df6b
commit
79924acaf0
2 changed files with 23 additions and 6 deletions
|
|
@ -10,11 +10,12 @@ import {
|
|||
MultiPolygon,
|
||||
Point,
|
||||
Polygon,
|
||||
Position,
|
||||
Position
|
||||
} from "geojson"
|
||||
import { Tiles } from "../Models/TileRange"
|
||||
import { Utils } from "../Utils"
|
||||
;("use strict")
|
||||
|
||||
("use strict")
|
||||
|
||||
export class GeoOperations {
|
||||
private static readonly _earthRadius: number = 6378137
|
||||
|
|
@ -106,7 +107,7 @@ export class GeoOperations {
|
|||
* @param lonlat0
|
||||
* @param lonlat1
|
||||
*/
|
||||
static distanceBetween(lonlat0: [number, number], lonlat1: [number, number] | Position) {
|
||||
static distanceBetween(lonlat0: [number, number] | Coord | Position, lonlat1: [number, number] | Position | Coord) {
|
||||
return turf.distance(lonlat0, lonlat1, { units: "meters" })
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue