跳到主要内容

flywave-mapview.mapviewutils.calculatedistancetogroundfromzoomlevel

Home > @flywave/flywave-mapview > MapViewUtils > calculateDistanceToGroundFromZoomLevel

MapViewUtils.calculateDistanceToGroundFromZoomLevel() function

Calculates and returns the distance from the ground, which is needed to put the camera to this height, to see the size of the area that would be covered by one tile for the given zoom level.

Signature:

function calculateDistanceToGroundFromZoomLevel(mapView: {
projection: Projection;
focalLength: number;
camera: THREE.PerspectiveCamera;
}, zoomLevel: number): number;

Parameters

Parameter

Type

Description

mapView

{ projection: Projection; focalLength: number; camera: THREE.PerspectiveCamera; }

Instance of MapView.

zoomLevel

number

Returns:



number