JS API
- Parameters
- Options
- Example
- Methods
- fitToBoundingBox
- getBoundingBox
- getInitialBoundingBox
- getLayers
- getMouseMode
- off
- on
- once
- refresh
- reset
- setMouseMode
- usingLayer
- usingNewLayer
- Events
- Parameters
- Example
- Methods
- addFeature
- addFeatureCollection
- bringForwards
- bufferGeometry
- changeProperties
- clearFilters
- clearFeatures
- clearStyle
- clipByFeatureCollection
- convertToCentroids
- filterByBoundingBox
- filterByFeatureCollection
- filterByNearest
- filterByText
- getFeatureCollection
- hide
- sendBackwards
- show
- style
- update
- usingFeature
filterByText
Creates an filter that filters features based on a text-based query statement. This is analogous to the WHERE clause of a SQL query.
Parameters
Name | Required | Description |
---|---|---|
statement | Yes | The text-based query statement. The following operators are supported: - Logical: or, ||, and, && - Relational: =, ==, !=, <>, <, >, <=, >= - Unary: !, not - Arithmetic: +, -, *, /, % - Bitwise: &, |, ^, <<, >>, ~ The following mathematical functions are supported: - Numeric: Ceiling, Exp, Floor, Log, Log10, Max, Min, Pow, Round, Sign, Sqrt, Truncate - Trigonometric: Acos, Asin, Atan, Cos, Sin, Tan The following built-in functions are supported: - Like(item-to-compare, comparison-expression) e.g. Like(NAME, 'John%') - In(item, list-of-items) e.g. In(NAME, 'Fred', 'John', 'Pete') - Format(item, format-string) e.g. Format(DATE, 'yyyy-MM-dd') |
Example
var qry = new Mapzania.QueryEngine();
qry.usingLayerSource("COUNTRIES")
.filterByText("LandLocked=='Y'")
.apply()
.then(function(data){
console.log(data);
});