Home > @magiclane/maps-sdk > ProjectionService > convert

ProjectionService.convert() method

Async method that returns the projection result from an input projection.

Signature:

static convert(from: Projection, toType: ProjectionType, onComplete?: (err: GemError, result: Projection | null) => void): TaskHandler | null;

Parameters

Parameter

Type

Description

from

Projection

The input projection that needs to be converted.

toType

ProjectionType

The type of projection to cast to.

onComplete

(err: GemError, result: Projection | null) => void

(Optional) Callback for the operation completion.

Returns:

TaskHandler | null

A TaskHandler that can be used to track the progress of the operation or null if it failed.