跳到主要内容

flywave-mapview.mapview.lookat_1

Home > @flywave/flywave-mapview > MapView > lookAt

MapView.lookAt() method

Warning: This API is now obsolete.

Use lookAt version with LookAtParams object parameter.

The method that sets the camera to the desired angle (tiltDeg) and distance (in meters) to the target location, from a certain heading (headingAngle).

Signature:

lookAt(target: GeoCoordLike, distance: number, tiltDeg?: number, headingDeg?: number): void;

Parameters

Parameter

Type

Description

target

GeoCoordLike

The location to look at.

distance

number

The distance of the camera to the target in meters.

tiltDeg

number

(Optional) The camera tilt angle in degrees (0 is vertical), curbed below 89deg 0

headingDeg

number

(Optional) The camera heading angle in degrees and clockwise (as opposed to yaw) 0 starting north.

Returns:



void

## Remarks