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. |
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
(readonly) coordinates :Array.<Number>
The GeoJSON geometry coordinates as specified to this GeoJSONGeometry's constructor.
Type:
- Array.<Number>
(readonly) type :String
The GeoJSON geometry type as specified to this GeoJSONGeometry's constructor.
Type:
- String
Methods
isLineStringType() → {Boolean}
Indicates whether this GeoJSON geometry is
[GeoJSONConstants.TYPE_LINE_STRING]
Returns:
True if the geometry is a LineString type.
- Type
- Boolean
isMultiLineStringType() → {Boolean}
Indicates whether this GeoJSON geometry is
[GeoJSONConstants.TYPE_MULTI_LINE_STRING]
Returns:
True if the geometry is a MultiLineString type.
- Type
- Boolean
isMultiPointType() → {Boolean}
Indicates whether this GeoJSON geometry is
[GeoJSONConstants.TYPE_MULTI_POINT]
Returns:
True if the geometry is a MultiPoint type.
- Type
- Boolean
isMultiPolygonType() → {Boolean}
Indicates whether this GeoJSON geometry is
[GeoJSONConstants.TYPE_MULTI_POLYGON]
Returns:
True if the geometry is a MultiPolygon type.
- Type
- Boolean
isPointType() → {Boolean}
Indicates whether this GeoJSON geometry is
[GeoJSONConstants.TYPE_POINT]
Returns:
True if the geometry is a Point type.
- Type
- Boolean
isPolygonType() → {Boolean}
Indicates whether this GeoJSON geometry is
[GeoJSONConstants.TYPE_POLYGON]
Returns:
True if the geometry is a Polygon type.
- Type
- Boolean