Documentation
Reference
2.1.56 (current version)
collection
interactivityModel
Interfaces

geometry.base.Point

Extends IBasePointGeometry.

The "Point" base geometry.

Constructor | Fields | Events | Methods

Constructor

geometry.base.Point([coordinates])

Parameters:

ParameterDefault valueDescription
coordinates null

Type: Number[]|null

Coordinates of a point.

Example:

var point = new ymaps.geometry.base.Point([30, 50]);

// This point will always correspond to the map center.
map.events.add('boundschange', function (e) {
    if (e.get('newCenter') != e.get('oldCenter')) {
        point.setCoordinates(e.get('newCenter'));
    }
});

Fields

NameTypeDescription
eventsevent.Manager

Geometry event manager.

Events

NameDescription
change

Changed coordinates. Instance of the Event class. Names of fields that are available via the Event#get method:

  • oldCoordinates - Old coordinates
  • newCoordinates - New coordinates.

Inherited from IPointGeometryAccess.

Methods

NameReturnsDescription
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 corner with the smallest coordinate values relative to the rest of the points in the area; the second item is the corner with the largest coordinate values.

Inherited from IBaseGeometry.

getCoordinates()

Number[]|null

Returns coordinates of a point.

Inherited from IPointGeometryAccess.

getType()

String

Returns the "Point" string.

Inherited from IBasePointGeometry.

setCoordinates(coordinates)

IPointGeometryAccess

Sets coordinates of a point.

Inherited from IPointGeometryAccess.

Fields details

events

{event.Manager} events

Geometry event manager.