new FilteringAndSorting(options, decorationMixins)
Class that extends nyc.ol.source.Decorating for providing functionality to sort by distance and filter by property
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Vector source options |
decorationMixins |
Array.<Object> | An array of objects whose members will be added to all features created by this source |
Extends
Methods
filter(filters) → {Array.<ol.Feature>}
Filters the features of this source
Parameters:
Name | Type | Description |
---|---|---|
filters |
Array.<nyc.ol.source.FilteringAndSorting.Filter> | Used to filter features by attributes |
- Source:
Returns:
An array of features contained in this source that are the result is the intersection of the applied filters
- Type
- Array.<ol.Feature>
isXhrFeaturesLoaded() → {boolean}
Has the request for geoJSON data completed successfully
- Inherited From:
- Source:
Returns:
The value indicating if the XHR request has successfully loaded the geoJSON data
- Type
- boolean
sort(coordinate) → {Array.<ol.Feature>}
Sorts features by distance from coordinate
Parameters:
Name | Type | Description |
---|---|---|
coordinate |
ol.Coordinate | Sort features by distance to this location |
- Source:
Returns:
An array of the features contained in this source that are the result is the intersection of the currently applied filters sorted by their distance to the coordinate provided
- Type
- Array.<ol.Feature>
Type Definitions
Filter
Object to use for filtering the features of an instance of nyc.ol.source.FilteringAndSorting
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
property |
string | The property name on which to filter features |
values |
Array.<string> | The valid values for the property |
- Source:
Events
change:featureloaderror
The feature load error event
Type:
- boolean
- Inherited From:
- Source:
change:featuresloaded
The features loaded event
Type:
- boolean
- Inherited From:
- Source: