Class: GeoJSONGeometry

GeoJSONGeometry(coordinates, type, bbox)

A geometry is a GeoJSON object where the type member's value is one of the following strings: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", or "GeometryCollection". A GeoJSON geometry object of any type other than "GeometryCollection" must have a member with the name "coordinates". The value of the coordinates member is always an array. The structure for the elements in this array is determined by the type of geometry.

Constructor

new GeoJSONGeometry(coordinates, type, bbox)

Constructs a GeoJSON Geometry object. Applications typically do not call this constructor. It is called by GeoJSON as GeoJSON is read.
Parameters:
Name Type Description
coordinates Array.<Number> An array containing geometry coordinates.
type String A string containing type of geometry.
bbox Object An array containing information on the coordinate range for geometries.
Source:
Throws:
If the specified mandatory coordinates or type are null or undefined.
Type
ArgumentError

Members

(readonly) bbox :Object

The GeoJSON bbox object as specified to this GeoJSONGeometry's constructor.
Type:
  • Object
Source:

(readonly) coordinates :Array.<Number>

The GeoJSON geometry coordinates as specified to this GeoJSONGeometry's constructor.
Type:
  • Array.<Number>
Source:

(readonly) type :String

The GeoJSON geometry type as specified to this GeoJSONGeometry's constructor.
Type:
  • String
Source:

Methods

isLineStringType() → {Boolean}

Indicates whether this GeoJSON geometry is [GeoJSONConstants.TYPE_LINE_STRING]
Source:
Returns:
True if the geometry is a LineString type.
Type
Boolean

isMultiLineStringType() → {Boolean}

Indicates whether this GeoJSON geometry is [GeoJSONConstants.TYPE_MULTI_LINE_STRING]
Source:
Returns:
True if the geometry is a MultiLineString type.
Type
Boolean

isMultiPointType() → {Boolean}

Indicates whether this GeoJSON geometry is [GeoJSONConstants.TYPE_MULTI_POINT]
Source:
Returns:
True if the geometry is a MultiPoint type.
Type
Boolean

isMultiPolygonType() → {Boolean}

Indicates whether this GeoJSON geometry is [GeoJSONConstants.TYPE_MULTI_POLYGON]
Source:
Returns:
True if the geometry is a MultiPolygon type.
Type
Boolean

isPointType() → {Boolean}

Indicates whether this GeoJSON geometry is [GeoJSONConstants.TYPE_POINT]
Source:
Returns:
True if the geometry is a Point type.
Type
Boolean

isPolygonType() → {Boolean}

Indicates whether this GeoJSON geometry is [GeoJSONConstants.TYPE_POLYGON]
Source:
Returns:
True if the geometry is a Polygon type.
Type
Boolean