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.
Type:
- Array
Properties:
Name | Type | Description |
---|---|---|
coordinates |
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:
wether the points is contained into the polygon
- Type
- Boolean
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 GeoPoint, suitable for Parse.
Returns:
- Type
- Object