geometry.Point
Extends IPointGeometry.
The "Point" geometry.
See Placemark
Constructor | Fields | Events | Methods
Constructor
Parameters:
Parameter | Default value | Description |
---|---|---|
position | null | Type: Number[] Coordinates of a point. |
options | — | Type: Object Geometry options. |
options.pixelRendering | "jumpy" | Type: String Method for calculating pixel coordinates of the shape in cycled projections.
This option accepts one of the following values:
|
options.projection | — | Type: IProjection Projection. |
Parameter | Default value | Description |
---|---|---|
position | null | Type: Number[] Coordinates of a point. |
options | — | Type: Object Geometry options. |
options.pixelRendering | "jumpy" | Type: String Method for calculating pixel coordinates of the shape in cycled projections.
This option accepts one of the following values:
|
options.projection | — | Type: IProjection Projection. |
Example:
// Creating an instance of the point geometry (specifying coordinates).
var pointGeometry = new ymaps.geometry.Point([30, 50]);
// Instantiating the geo object and passing our geometry to the constructor.
var placemark = new ymaps.GeoObject({ geometry: pointGeometry });
// Changing the vertexes via the geo object's "geometry" property.
placemark.geometry.setCoordinates([20, 40]);
// Or directly.
pointGeometry.setCoordinates([20, 40]);
// You can also access pointGeometry via placemark.geometry
Fields
Name | Type | Description |
---|---|---|
events | IEventManager | Event manager. Inherited from IEventEmitter. |
options | IOptionManager | Options manager. Inherited from ICustomizable. |
Name | Type | Description |
---|---|---|
events | IEventManager | Event manager. Inherited from IEventEmitter. |
options | IOptionManager | Options manager. Inherited from ICustomizable. |
Events
Name | Description |
---|---|
change | Changed coordinates.
Instance of the Event class.
Names of fields that are available via the Event.get method:
Inherited from IPointGeometryAccess. |
mapchange | Map reference changed.
Instance of the Event class.
Names of fields that are available via the Event.get method:
Inherited from IGeometry. |
optionschange | Change to the object options. Inherited from ICustomizable. |
pixelgeometrychange | The pixel geometry changed.
Instance of the Event class.
Names of fields that are available via the Event.get method:
Inherited from IGeometry. |
Name | Description |
---|---|
change | Changed coordinates.
Instance of the Event class.
Names of fields that are available via the Event.get method:
Inherited from IPointGeometryAccess. |
mapchange | Map reference changed.
Instance of the Event class.
Names of fields that are available via the Event.get method:
Inherited from IGeometry. |
optionschange | Change to the object options. Inherited from ICustomizable. |
pixelgeometrychange | The pixel geometry changed.
Instance of the Event class.
Names of fields that are available via the Event.get method:
Inherited from IGeometry. |
Methods
Name | Returns | Description |
---|---|---|
getBounds() | Number[][]|null | Returns coordinates of the two opposite corners of the area that surrounds the geometry. The first item in the array is the southwest corner of the area; the second item is the northeast corner. Inherited from IGeometry. |
getCoordinates() | Number[]|null | Returns coordinates of a point. Inherited from IPointGeometryAccess. |
getMap() | Map|null | Returns the current map. Inherited from IGeometry. |
getPixelGeometry([options]) | Returns the pixel geometry corresponding to the given geometry, its options, and the map state. Inherited from IGeometry. | |
getType() | String | Returns the "Point" string. Inherited from IPointGeometry. |
setCoordinates(coordinates) | Sets coordinates of a point. Inherited from IPointGeometryAccess. | |
setMap(map) | Sets the map. Inherited from IGeometry. |
Name | Returns | Description |
---|---|---|
getBounds() | Number[][]|null | Returns coordinates of the two opposite corners of the area that surrounds the geometry. The first item in the array is the southwest corner of the area; the second item is the northeast corner. Inherited from IGeometry. |
getCoordinates() | Number[]|null | Returns coordinates of a point. Inherited from IPointGeometryAccess. |
getMap() | Map|null | Returns the current map. Inherited from IGeometry. |
getPixelGeometry([options]) | Returns the pixel geometry corresponding to the given geometry, its options, and the map state. Inherited from IGeometry. | |
getType() | String | Returns the "Point" string. Inherited from IPointGeometry. |
setCoordinates(coordinates) | Sets coordinates of a point. Inherited from IPointGeometryAccess. | |
setMap(map) | Sets the map. Inherited from IGeometry. |