ALKMaps.Filter.Spatial

This class represents a spatial filter.  Currently implemented: BBOX, DWithin and Intersects

Inherits from

Summary
ALKMaps.Filter.SpatialThis class represents a spatial filter.
Properties
type{String} Type of spatial filter.
property{String} Name of the context property to compare.
value{ALKMaps.Bounds || ALKMaps.Geometry} The bounds or geometry to be used by the filter.
distance{Number} The distance to use in a DWithin spatial filter.
distanceUnits{String} The units to use for the distance, e.g.
Constructor
ALKMaps.Filter.SpatialCreates a spatial filter.
Functions
evaluateEvaluates this filter for a specific feature.
cloneClones this filter.

Properties

type

{String} Type of spatial filter.

The type should be one of

  • ALKMaps.Filter.Spatial.BBOX
  • ALKMaps.Filter.Spatial.INTERSECTS
  • ALKMaps.Filter.Spatial.DWITHIN
  • ALKMaps.Filter.Spatial.WITHIN
  • ALKMaps.Filter.Spatial.CONTAINS

property

{String} Name of the context property to compare.

value

{ALKMaps.Bounds || ALKMaps.Geometry} The bounds or geometry to be used by the filter.  Use bounds for BBOX filters and geometry for INTERSECTS or DWITHIN filters.

distance

{Number} The distance to use in a DWithin spatial filter.

distanceUnits

{String} The units to use for the distance, e.g.  ‘m’.

Constructor

ALKMaps.Filter.Spatial

Creates a spatial filter.

Parameters

options{Object} An optional object with properties to set on the filter.

Returns

{ALKMaps.Filter.Spatial}

Functions

evaluate

evaluate: function(feature)

Evaluates this filter for a specific feature.

Parameters

feature{ALKMaps.Feature.Vector} feature to apply the filter to.

Returns

{Boolean} The feature meets filter criteria.

clone

clone: function()

Clones this filter.

Returns

{ALKMaps.Filter.Spatial} Clone of this filter.

Instances of this class represent bounding boxes.
A Geometry is a description of a geographic object.
evaluate: function(feature)
Evaluates this filter for a specific feature.
clone: function()
Clones this filter.
This class represents an OGC Filter.
Creates a spatial filter.
Vector features use the ALKMaps.Geometry classes as geometry description.
Close