跳到主要内容

flywave-mapview.mapviewfog

Home > @flywave/flywave-mapview > MapViewFog

MapViewFog class​

Manages the fog display in MapView.

Signature:

export declare class MapViewFog 

Constructors​

Constructor

Modifiers

Description

(constructor)(m_scene)

Constructs a MapViewFog instance.

Properties​

Property

Modifiers

Type

Description

enabled

boolean

Returns the current fog status, enabled or disabled.

Methods​

Method

Modifiers

Description

reset(fog)

Sets the fog depending on the instance provided. This function is called when a theme is loaded. Fog is added only if the theme contains a fog definition with a: - color property, used to set the fog color. - ratio property, used to set the fog density. - range property, used to set the fog effect range.

update(mapView, viewDistance)

Updates the fog at runtime, depending on the camera and view distance.