跳到主要内容

flywave-mapview.lookatparams

Home > @flywave/flywave-mapview > LookAtParams

LookAtParams interface

Parameters for .

Signature:

export interface LookAtParams 

Properties

Property

Modifiers

Type

Description

bounds

GeoBox | GeoBoxExtentLike | GeoCoordLike[] | GeoPolygon

Fit MapView to these boundaries.

If specified, zoomLevel and distance parameters are ignored and lookAt calculates best zoomLevel to fit given bounds.

* if bounds is , then lookAt use LookAtParams.target or bounds.target and ensure whole box is visible

* if bounds is , then lookAt use bounds.getCentroid() and ensure whole polygon is visible

* if bounds is , then lookAt will use LookAtParams.target or current MapView.target and ensure whole extents are visible

* if bounds is [[GeoCoordLike]][], then lookAt will use LookAtParams.target or calculated target as center of world box covering given points and ensure all points are visible

Note in sphere projection some points are not visible if you specify bounds that span more than 180 degrees in any direction.

distance

number

Camera distance to the target point in world units. zoomLevel defaults will be used if not set.

heading

number

Heading angle in degrees and clockwise. 0 is north-up. 0 in context. MapView.heading in context.

target

GeoCoordLike

Target/look at point of the MapView.

If the given point is not on the ground (altitude != 0) MapView will do a raycasting internally to find a target on the ground.

As a consequence MapView.target and MapView.zoomLevel will not match the values that were passed into the method. new GeoCoordinates(25, 0) in context. MapView.target in context.

tilt

number

Tilt angle in degrees. 0 is top down view. 0 in context. MapView.tilt in context. Maximum supported tilt is 89°

zoomLevel

number

Zoomlevel of the MapView. Takes precedence over distance. 5 in context. MapView.zoomLevel in context.