Abstract
Constructs a new OverlayTextProvider
The layer to provide overlay text for
Specifies what format string to use at what scale range
The default format string. This is used if no format string was found for the current scale.
Optional
options: OverlayTextProviderConstructorOptionsOptions for this OverlayTextProvider.
Returns the current overlay text. This changes whenever coordinate specified by OverlayTextProviderConstructorOptions.coordinate changes. Ie. the map is moved (or the mouse moves if OverlayTextCoordinateType.MOUSE_CURSOR.
Returns the current state of visibility. Visible is true when:
Protected
Abstract
formatCalled whenever a common map coordinate (OverlayTextCoordinateType.COMMON_MAP_COORDINATE) needs to be formatted to a string.
A reference to the map for which to determine the common map coordinate.
The format string to use. This is the format string that matches the current scale range (as passed into the constructor), or the default format string if no matching scale range was found.
Protected
Abstract
formatCalled whenever a single (model) point needs to be formatted to a string.
The point to format to a string
The format string to use. This is the format string that matches the current scale range (as passed into the constructor), or the default format string if no matching scale range was found.
Protected
updateCall this to update text. For example, this is called when the map is moved.
Protected
viewThis event fires whenever OverlayTextProvider.text changes.
This event fires whenever OverlayTextProvider.visible changes.
A utility class that can be used to implement a UI component that shows an overlay text for a layer, for example an overlay that shows the current MGRS grid zone.
The text can be based on the following types of coordinates:
This utility fires events whenever the text changes, or the visibility of the layer changes. You can use these events to update the state of your UI component.
Since
2022.0