JS API
Map Object
QueryEngine Object
Layer Object
Feature Object
Query Object
GeoJson Function Library (Experimental)

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 map = new Mapzania.Map("map-div", "AFRICA");

map.usingLayer("COUNTRIES")
  .filterByText("LandLocked=='Y'")
  .update();