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

PointCollection

Mixin Extends:

L.Layer, PaletteMixin

A collection of points sharing the same parameters and coordinate referencing system.

See:

Constructor Summary

Public Constructor
public

constructor(covcoll: CoverageCollection, options: Object)

Member Summary

Public Members
public get

The parameter that is visualized.

Method Summary

Public Methods
public

Binds a popup to each point instance.

public

Returns the geographic bounds of the coverage collection.

public

getValueAt(latlng: L.LatLng, maxDistance: number): number | null | undefined

Return the displayed value of the point coverage closest to the given position and within the given maximum distance.

public

redraw()

Redraw each point layer.

Public Constructors

public constructor(covcoll: CoverageCollection, options: Object) source

Params:

NameTypeAttributeDescription
covcoll CoverageCollection

The coverage collection to visualize.

options Object
  • optional

The options object.

options.parameter string
  • optional

The key of the parameter to display.

options.palette Palette
  • optional

The initial color palette to use, the default depends on the parameter type.

options.paletteExtent string
  • optional
  • default: 'full'

The initial palette extent, either 'full', 'fov', or specific: [-10,10].

options.defaultColor string
  • optional
  • default: 'black'

The color to use for missing data or if no parameter is set.

options.pointClass class
  • optional
  • default: Point

The PointDataLayer class to use for the individual points.

options.pointOptionsFn function
  • optional

A function that returns additional options to apply for each point class instance.

Public Members

public get parameter: Parameter source

The parameter that is visualized.

Public Methods

public bindPopupEach(fn: function(cov: Coverage): String | HTMLElement | L.Popup) source

Binds a popup to each point instance.

Params:

NameTypeAttributeDescription
fn function(cov: Coverage): String | HTMLElement | L.Popup

Returns the popup for a given point coverage.

public getBounds(): L.LatLngBounds source

Returns the geographic bounds of the coverage collection.

Return:

L.LatLngBounds

public getValueAt(latlng: L.LatLng, maxDistance: number): number | null | undefined source

Return the displayed value of the point coverage closest to the given position and within the given maximum distance. If no coverage is found, undefined is returned, otherwise a number or null (no-data).

Params:

NameTypeAttributeDescription
latlng L.LatLng

reference position

maxDistance number

Maximum distance in meters that the point coverage may be apart from the given position.

Return:

number | null | undefined

public redraw() source

Redraw each point layer.