projection.Cartesian
Extends IProjection.
Cartesian projection of a rectangular area. Uses the "coordorder" parameter for loading the API - when the value is "latlong", in an array of point coordinates y should be in the first position, and x in the second.
Constructor
Creates a projection of a rectangular coordinate area in pixels. The size of the area in pixels is always NxN, where N = 256 * 2^zoom.
Parameters:
Parameter | Default value | Description |
---|---|---|
bounds * | — | Type: Number[][] Array of two points, the coordinates of the lower-left and upper-right corners of a rectangular coordinate area. |
cycled | [false, false] | Type: Boolean[] Array of indicators of map cycling on x and y. |
scale | 1 | Type: Number|Number[] The increment of a division on an axis. Can be a number or pair of numbers for each of the axes. |
Parameter | Default value | Description |
---|---|---|
bounds * | — | Type: Number[][] Array of two points, the coordinates of the lower-left and upper-right corners of a rectangular coordinate area. |
cycled | [false, false] | Type: Boolean[] Array of indicators of map cycling on x and y. |
scale | 1 | Type: Number|Number[] The increment of a division on an axis. Can be a number or pair of numbers for each of the axes. |
* Mandatory parameter/option.
Methods
Name | Returns | Description |
---|---|---|
fromGlobalPixels(globalPixelPoint, zoom) | Number[] | Converts pixel coordinates to the projection's coordinates at the specified zoom level. Inherited from IProjection. |
getCoordSystem() | Returns the coordinate system that is used by the projection. Inherited from IProjection. | |
isCycled() | Boolean[] | Indicator of projection cycling. Inherited from IProjection. |
toGlobalPixels(coordPoint, zoom) | Number[] | Converts projection coordinates to global pixel coordinates at the specified zoom level. Inherited from IProjection. |
Name | Returns | Description |
---|---|---|
fromGlobalPixels(globalPixelPoint, zoom) | Number[] | Converts pixel coordinates to the projection's coordinates at the specified zoom level. Inherited from IProjection. |
getCoordSystem() | Returns the coordinate system that is used by the projection. Inherited from IProjection. | |
isCycled() | Boolean[] | Indicator of projection cycling. Inherited from IProjection. |
toGlobalPixels(coordPoint, zoom) | Number[] | Converts projection coordinates to global pixel coordinates at the specified zoom level. Inherited from IProjection. |