Module
GeoDistanceRangeFilter
GeoDistanceRangeFilter ( fieldName )
Filter results to those which fall within the given distance range of the point of origin.
|
Method Summary
Returns | Name | Description |
---|---|---|
String | _type() | The type of ejs object. For internal use only. |
Object | cache(trueFalse) | Enable or disable caching of the filter |
Object | cacheKey(key) | Sets the cache key. |
Object | distanceType(type) | How to compute the distance. Can either be arc (better precision) or plane (faster). Defaults to arc. |
Object | field(f) | Sets the fields to filter against. |
Object | from(numericDistance) | Sets the start point of the distance range |
Object | gt(val) | Greater than value. Same as setting from to the value, and include_lower to false, |
Object | gte(val) | Greater than or equal to value. Same as setting from to the value, and include_lower to true. |
Object | includeLower(trueFalse) | Should the first from (if set) be inclusive or not. Defaults to true |
Object | includeUpper(trueFalse) | Should the last to (if set) be inclusive or not. Defaults to true. |
Object | lt(val) | Less than value. Same as setting to to the value, and include_upper to false. |
Object | lte(val) | Less than or equal to value. Same as setting to to the value, and include_upper to true. |
Object | name(name) | Sets the filter name. |
Object | normalize(trueFalse) | If the lat/long points should be normalized to lie within their respective normalized ranges. Normalized ranges are: lon = -180 (exclusive) to 180 (inclusive) range lat = -90 to 90 (both inclusive) range |
Object | optimizeBbox(t) | Will an optimization of using first a bounding box check will be used. Defaults to memory which will do in memory checks. Can also have values of indexed to use indexed value check, or none which disables bounding box optimization. |
Object | point(p) | Sets the point of origin in which distance will be measured from |
Object | to(numericDistance) | Sets the end point of the distance range |
Object | toJSON() | Returns the filter object. |
Object | unit(unit) | Sets the distance unit. Valid values are "mi" for miles or "km" for kilometers. Defaults to "km". |
Method Detail
cache
Object cache ( trueFalse )
Enable or disable caching of the filter
|
cacheKey
Object cacheKey ( key )
Sets the cache key.
|
distanceType
Object distanceType ( type )
How to compute the distance. Can either be arc (better precision)
or plane (faster). Defaults to arc.
|
field
Object field ( f )
Sets the fields to filter against.
|
from
Object from ( numericDistance )
Sets the start point of the distance range
|
gt
Object gt ( val )
Greater than value. Same as setting from to the value, and
include_lower to false,
|
gte
Object gte ( val )
Greater than or equal to value. Same as setting from to the value,
and include_lower to true.
|
includeLower
Object includeLower ( trueFalse )
Should the first from (if set) be inclusive or not.
Defaults to true
|
includeUpper
Object includeUpper ( trueFalse )
Should the last to (if set) be inclusive or not. Defaults to true.
|
lt
Object lt ( val )
Less than value. Same as setting to to the value, and include_upper
to false.
|
lte
Object lte ( val )
Less than or equal to value. Same as setting to to the value,
and include_upper to true.
|
name
Object name ( name )
Sets the filter name.
|
normalize
Object normalize ( trueFalse )
If the lat/long points should be normalized to lie within their
respective normalized ranges.
Normalized ranges are:
lon = -180 (exclusive) to 180 (inclusive) range
lat = -90 to 90 (both inclusive) range
|
optimizeBbox
Object optimizeBbox ( t )
Will an optimization of using first a bounding box check will be
used. Defaults to memory which will do in memory checks. Can also
have values of indexed to use indexed value check, or none which
disables bounding box optimization.
|
point
Object point ( p )
Sets the point of origin in which distance will be measured from
|
to
Object to ( numericDistance )
Sets the end point of the distance range
|
unit
Object unit ( unit )
Sets the distance unit. Valid values are "mi" for miles or "km"
for kilometers. Defaults to "km".
|