This section describes the methods exposed by the object.

This object is used for manipulating map projections.


Creates a new projection.

Export: projection
data: Object

An object specifying the conversion functions.

Object structure:

The function that converts coordinates from a data space to [-1, 1] * [-1, 1] space.

from: function

The function that converts coordinates from the [-1, 1] * [-1, 1] space to the data space.

aspectRatio: Number

The projection's aspect ratio.

Return Value: Object

The projection.

After creating the custom projection, you can add it to the projections storage or assign the returning object to the projection option of the widget.

View Demo