ejsShape

A Shape object that can be used in queries and filters that take a Shape. Shape uses the GeoJSON format.

See http://www.geojson.org/

Module

 Shape

Shape ( type, coords )

Defines a shape


Parameters
type <String> A valid shape type.
coords <Array> An valid coordinat definition for the given shape.

Method Summary

Returns Name Description
String_type()The type of ejs object. For internal use only.
Objectcoordinates(c)Sets the coordinates for the shape definition. Note, the coordinates are not validated in this api. Please see GeoJSON and ElasticSearch documentation for correct coordinate definitions.
Objectradius(r)Sets the radius for parsing a circle Shape.
StringtoJSON()Retrieves the internal script object. This is typically used by internal API functions so use with caution.
Objecttype(t)Sets the shape type. Can be set to one of: point, linestring, polygon, multipoint, envelope, or multipolygon.

Method Detail

 _type

String _type ( )
The type of ejs object. For internal use only.

Returns
the type of object

 coordinates

Object coordinates ( c )
Sets the coordinates for the shape definition. Note, the coordinates are not validated in this api. Please see GeoJSON and ElasticSearch documentation for correct coordinate definitions.

Parameters
c <Array> a valid coordinates definition for the shape.
Returns
returns this so that calls can be chained.

 radius

Object radius ( r )
Sets the radius for parsing a circle Shape.

Parameters
r <String> a valid radius value for a circle.
Returns
returns this so that calls can be chained.

 toJSON

String toJSON ( )
Retrieves the internal script object. This is typically used by internal API functions so use with caution.

Returns
returns this object's internal object representation.

 type

Object type ( t )
Sets the shape type. Can be set to one of: point, linestring, polygon, multipoint, envelope, or multipolygon.

Parameters
t <String> a valid shape type.
Returns
returns this so that calls can be chained.

Request

Queries

Filters

Aggregations

Facets

Suggesters

Geo