Constructor
new Polygon(coordinates)
Parameters:
Name | Type | Description |
---|---|---|
coordinates |
Array.<Array.<Number>>
|
Array.<Parse.GeoPoint>
|
An Array of coordinate pairs |
Members
coordinates :Array
Coordinates value for this Polygon. Throws an exception if not valid type.
Properties:
Name | Type | Description |
---|---|---|
coordinates |
Type:
-
Array
Methods
(static) _validate(coords)
Validates that the list of coordinates can form a valid polygon
Parameters:
Name | Type | Description |
---|---|---|
coords |
Array
|
the list of coordinated to validate as a polygon |
Throws:
TypeError
containsPoint(point) → {Boolean}
Parameters:
Name | Type | Description |
---|---|---|
point |
Parse.GeoPoint
|
Returns:
- Type:
-
Boolean
Returns if the point is contained in the polygon
equals(other) → {Boolean}
Checks if two polygons are equal
Parameters:
Name | Type | Description |
---|---|---|
other |
Parse.Polygon
|
Object
|
Returns:
- Type:
-
Boolean
toJSON() → {Object}
Returns a JSON representation of the Polygon, suitable for Parse.
Returns:
- Type:
-
Object