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.
Options for this OverlayTextProvider.
This event fires whenever OverlayTextProvider.text changes.
This event fires whenever OverlayTextProvider.visible changes.
Returns the current overlay text. This changes whenever coordinate specified by OverlayTextProviderConstructorOptions.coordinate changes. Ie. the map is moved (or the mouse moves if OverlayTextProviderConstructorOptions.coordinate is OverlayTextCoordinateType.MOUSE_CURSOR.
Returns the current state of visibility. Visible is true when:
Destroy this OverlayTextProvider. This cleans up all map / layer listeners it has set up.
Called 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.
Called 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.
Call this to update text. For example, this is called when the map is moved.
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.
2022.0