<< Click to Display Table of Contents >>
new sg.geometry.Point(x, y)
Description
create a point object.
Position
Geometry.js
Parameters
Parameter |
Type |
Description |
x |
Number |
x coordinate |
y |
Number |
y coordinate |
Properties
Properties |
Type |
Description |
extent |
sg.geometry.Extent |
Geometry extent |
type |
String |
Geometry type |
x |
Number |
x coordinate |
y |
Number |
y coordinate |
Methods
Methods |
Type |
Description |
|||||||||
getExtent() |
Returns: sg.geometry.Extent |
Return geometry extent Returns:
|
|||||||||
toWkt() |
Returns: String |
Convert to WKT string Returns:
|
|||||||||
setX(x) |
Number |
Define x coordinate.
|
|||||||||
setY(y) |
Number |
Define y coordinate.
|
|||||||||
update(x,y) |
Number |
Update a point.
|
|||||||||
getFirstPoint_() |
Returns: sg.geometry.Point |
Get the first point. Returns:
|
|||||||||
clone() |
Returns: sg.geometry.Point |
Duplicate the point object. Returns:
|
|||||||||
forEachVertex(callback) |
function |
Get the each vertex by callback function. callback(context) { //The point (sg.geometry.Point) Context.point; } |
Example
|
©2015 Supergeo Technologies Inc.