Description
A location defined by an X- and Y- coordinate. It can be map units or screen units.
Class hierarchy
esri.geometry.Geometry
|_ esri.geometry.Point
Constructor
Properties
| x |
Number
|
X-coordinate of a point in map units. |
| y |
Number
|
Y-coordinate of a point in map units. |
Methods
Constructor Detail
esri.geometry.Point(x, y, spatialReference)
Creates a new Point object using x, y, and a spatial reference.
Parameters:
|
<Number>
x |
Required |
X-coordinate of a point in map units.
|
|
<Number>
y |
Required |
Y-coordinate of a point in map units.
|
|
<SpatialReference>
spatialReference |
Required |
Spatial reference of the geometry.
|
Code snippets:
new esri.geometry.Point(-118.15, 33.80, new esri.SpatialReference({ wkid: 4326 }))
esri.geometry.Point([x,y], spatialReference)
Creates a new Point object using an array containing an x,y coordinate value and a spatial reference.
Parameters:
|
<Array>
[x,y] |
Required |
An array that includes an x,y coordinate.
|
|
<SpatialReference>
spatialReference |
Required |
Spatial reference of the geometry.
|
esri.geometry.Point(json)
Creates a new Point object using a JSON object.
Parameters:
|
<Object>
json |
Required |
A JSON object that contains an x,y coordinate.
|
Properties Detail
X-coordinate of a point in map units.
Y-coordinate of a point in map units.
Methods Detail
Offsets the point in an x and y direction. Units are map units.
Input Parameters:
|
<Number> dx |
Required |
Value for x-coordinate of point. |
|
<Number> dy |
Required |
Value for y-coordinate of point. |
Sets x-coordinate of point.
The return value of Point was added at v1.4.
Input Parameters:
|
<Number> x |
Required |
Value for x-coordinate of point. |
Sets y-coordinate of point.
The return value of Point was added at v1.4.
Input Parameters:
|
<Number> y |
Required |
Value for y-coordinate of point. |
Updates a point. (As of v1.4)
Input Parameters:
|
<Number> x |
Required |
X-coordinate of the updated point. |
|
<Number> y |
Required |
Y-coordinate of the updated point. |