UX(nearby_features): place nearby panorama markers at nearly the right place

This commit is contained in:
Pieter Vander Vennet 2025-05-24 02:04:32 +02:00
parent 9135f1df6b
commit 79924acaf0
2 changed files with 23 additions and 6 deletions

View file

@ -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" })
}