ValuePopup
Extends:
Direct Subclass:
A popup that contains the parameter values of the given coverage layers at the location of the popup.
The popup content is updated when one of the following occurs:
- popup is added to a map
- popup location is changed
- coverage layer is added or removed
- updateData() is called
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object, source: L.Layer) |
Member Summary
Public Members | ||
public |
The coverage data layers added to this popup. |
Method Summary
Public Methods | ||
public |
addCoverageLayer(layer: DataLayer): this |
|
public |
Returns whether there is any non-missing coverage data at the current popup location. |
|
public |
removeCoverageLayer(layer: DataLayer): this |
|
public |
updateData(): this Updates the popup content from the data layers. |
Public Constructors
public constructor(options: Object, source: L.Layer) source
Params:
Name | Type | Attribute | Description |
options | Object |
|
The options object. |
options.maxDistanceForPointsInPx | number |
|
The maximum distance in pixels from the popup location for which point-data values should be included. |
options.layers | Array<DataLayer> |
|
An initial set of coverage data layers. |
source | L.Layer |
|
Used to tag the popup with a reference to the Layer to which it refers. |
Public Members
Public Methods
public addCoverageLayer(layer: DataLayer): this source
Params:
Name | Type | Attribute | Description |
layer | DataLayer | The data layer to add. |
Return:
this |
public hasData(): boolean source
Returns whether there is any non-missing coverage data at the current popup location. This function only works after the popup has been added to the map.
public removeCoverageLayer(layer: DataLayer): this source
Params:
Name | Type | Attribute | Description |
layer | DataLayer | The data layer to remove. |
Return:
this |
public updateData(): this source
Updates the popup content from the data layers.
Gets called automatically when setLatLng
is called.
Return:
this |