Documentation
Reference
2.1.56 (current version)
collection
interactivityModel
Interfaces

projection.sphericalMercator

Static object.

Instance of IProjection

Mercator projection on a sphere. It is used by many cartographic services, including OpenStreetMap.

Methods

Example:

// Creating the map in the spherical Mercator projection
var map = new ymaps.Map('YMapsID', {
    center: [55, 37],
    zoom: 6
}, {
    projection: ymaps.projection.sphericalMercator
});
map.layers.add(new ymaps.Layer('http://tile.openstreetmap.org/%z/%x/%y.png'));

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.