Home Reference Source Repository
import {ValuePopup} from 'leaflet-coverage/'
public class | source

ValuePopup

Extends:

L.Popup → ValuePopup

Direct Subclass:

DraggableValuePopup

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
public

updateData(): this

Updates the popup content from the data layers.

Public Constructors

public constructor(options: Object, source: L.Layer) source

Params:

NameTypeAttributeDescription
options Object
  • optional

The options object.

options.maxDistanceForPointsInPx number
  • optional
  • default: 20

The maximum distance in pixels from the popup location for which point-data values should be included.

options.layers Array<DataLayer>
  • optional

An initial set of coverage data layers.

source L.Layer
  • optional

Used to tag the popup with a reference to the Layer to which it refers.

Public Members

public coverageLayers: Set<DataLayer> source

The coverage data layers added to this popup.

Public Methods

public addCoverageLayer(layer: DataLayer): this source

Params:

NameTypeAttributeDescription
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.

Return:

boolean

public removeCoverageLayer(layer: DataLayer): this source

Params:

NameTypeAttributeDescription
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