React Common - Utils - viz - map

An object that serves as a namespace for the VectorMap widget.

projection

A namespace with methods that manipulate map projections.

import { ProjectionTypes } from "devextreme-react/projection"

projection(data)

Creates a new projection.

import { ProjectionTypes } from "devextreme-react/projection"
Parameters:
data:

Object

An object specifying the conversion functions.

Object structure:
Name Type Description
aspectRatio

Number

The projection's aspect ratio.

from

Function

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

to

Function

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

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