Documentation
Reference
2.1.56 (current version)
collection
interactivityModel
Interfaces

IProjection

Projection. Describes how the real map is projected onto the endless pixel plane. One "world" should be sized 256x256 pixels at the zero zoom level, while the upper left corner of this world has the coordinates (0,0) and the axes coordinates go to the right and down. "Worlds" can be connected along any axis (or both axes at once).

Constructor | Methods

Constructor

IProjection()

Methods

NameReturnsDescription
fromGlobalPixels(globalPixelPoint, zoom)

Number[]

Converts pixel coordinates to the projection's coordinates at the specified zoom level.

getCoordSystem()

ICoordSystem

Returns the coordinate system that is used by the projection.

isCycled()

Boolean[]

Indicator of projection cycling.

toGlobalPixels(coordPoint, zoom)

Number[]

Converts projection coordinates to global pixel coordinates at the specified zoom level.

Methods details

fromGlobalPixels

{Number[]} fromGlobalPixels(globalPixelPoint, zoom)

Converts pixel coordinates to the projection's coordinates at the specified zoom level.

Returns a point in the projection's coordinates.

Parameters:

ParameterDefault valueDescription
globalPixelPoint*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[]

A point in pixel coordinates.

zoom*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number

Zoom level.

* Mandatory parameter/option.

getCoordSystem

{ICoordSystem} getCoordSystem()

Returns the coordinate system that is used by the projection.

isCycled

{Boolean[]} isCycled()

Indicator of projection cycling.

Returns a pair of flags that show whether the map is looped along the pixel axes (x/y).

toGlobalPixels

{Number[]} toGlobalPixels(coordPoint, zoom)

Converts projection coordinates to global pixel coordinates at the specified zoom level.

Returns a pair of pixel coordinates.

Parameters:

ParameterDefault valueDescription
coordPoint*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number[]

A point in the projection's coordinates.

zoom*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

Type: Number

Zoom level.

* Mandatory parameter/option.