Class: FilterAndSort

nyc/ol/source/FilterAndSort~ FilterAndSort


new FilterAndSort(options)

Class to auto load all features from a URL

Parameters:
Name Type Description
options olx.source.VectorOptions

Constructor optionss

Source:
See:

Extends

  • ol.source.Vector

Methods


filter(filters)

Filters the features of this source

Parameters:
Name Type Description
filters Array.<Array.<module:nyc/ol/source/FilterAndSort~FilterAndSort.Filter>>

Used to filter features by attributes

Source:
Returns:

An array of features contained in this source that are the result of the intersection of the applied filters

Type
Array.<ol.Feature>

sort(coordinate)

Sort features by distance from a coordinate

Parameters:
Name Type Description
coordinate ol.Coordinate

The coordinate from which to measure distance to features

Source:
Returns:

The features, each decorated with a getDistance function that returns a module:nyc/ol/source/FilterAndSort~FilterAndSort.Distance object

Type
Array.<ol.Feature>

Type Definitions


Distance

Type:
  • Object
Properties:
Name Type Description
distance number

The distance

units string

The distance units

Source:

Filter

Type:
  • Object
Properties:
Name Type Description
property string

The property name on which to filter features

values Array.<string>

The values used to filter features

Source: