UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

34 lines (28 loc) 1.37 kB
/** * DevExtreme (viz/vector_map/projection.d.ts) * Version: 20.1.7 * Build date: Tue Aug 25 2020 * * Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ /** Warning! This type is used for internal purposes. Do not import it directly. */ export interface VectorMapProjectionConfig { /** Specifies the projection's ratio of the width to the height. */ aspectRatio?: number; /** Converts coordinates from [x, y] to [lon, lat]. */ from?: ((coordinates: Array<number>) => Array<number>); /** Converts coordinates from [lon, lat] to [x, y]. */ to?: ((coordinates: Array<number>) => Array<number>); } type Projection = (data: VectorMapProjectionConfig) => any; type ProjectionMethods = { /** Adds a new projection to the internal projection storage. */ add(name: string, projection: VectorMapProjectionConfig | any): void; /** Warning! This type is used for internal purposes. Do not import it directly. */ /** Gets a predefined or custom projection from the projection storage. */ get(name: 'equirectangular' | 'lambert' | 'mercator' | 'miller' | string): any; } /** Warning! This type is used for internal purposes. Do not import it directly. */ /** Creates a new projection. */ export const projection: Projection & ProjectionMethods;