The options for a pan operation.

Hierarchy

  • MapNavigatorPanOptions

Properties

animate?: boolean | MapNavigatorAnimationOptions

When falsy, the pan operation will be immediate. When truthy, the pan operation will be animated.

The default value is false.

Regardless of the value of 'animate', you have to wait for the returned Promise to resolve to ensure that the map has navigated to the target position. To alter the animation, you can assign an MapNavigatorAnimationOptions to this option.

constantYaw?: boolean

If true, the pan operation will keep yaw constant. The tracked point will not remain exactly under the mouse at all times, but the camera will keep the same yaw (angle to north direction, also called azimuth) while panning.

This property has no effect on panning 2D maps.

Default

false

Since

2022.1

targetLocation: Point

This Point will end up at toViewLocation after the pan operation. Can be in a model, map or view reference. If the point is in a view reference, the map point that corresponds to that view point is used. In 3D, this will be the point on terrain at that view point.

toViewLocation?: Point

A Point in view reference. targetLocation will be at toViewLocation after the pan operation. Must be in the view reference (reference === null, pixel coordinates). When omitted, will default to the map's view center.