@nativescript-community/ui-carto
Version:
NativeScript plugin for CARTO Mobile SDK
51 lines (50 loc) • 2.64 kB
TypeScript
import { BaseNative } from '../BaseNative';
import { DefaultLatLonKeys, GenericMapPos, MapVec, ScreenBounds, ScreenPos } from './index.common';
export * from './index.common';
export declare class MapBounds<T = DefaultLatLonKeys> extends BaseNative<NTMapBounds, {}> {
northeast?: GenericMapPos<T>;
southwest?: GenericMapPos<T>;
constructor(northeast?: GenericMapPos<T>, southwest?: GenericMapPos<T>, native?: NTMapBounds);
createNative(): NTMapBounds;
contains(position: GenericMapPos<T> | MapBounds<T>): boolean;
intersects(position: MapBounds<T>): boolean;
shrinkToIntersection(position: MapBounds): void;
equals(position: MapBounds<T>): boolean;
getCenter(): GenericMapPos<DefaultLatLonKeys>;
toJSON(): {
southwest: GenericMapPos<T>;
northeast: GenericMapPos<T>;
};
}
export declare function fromNativeMapPos<T = DefaultLatLonKeys>(position: NTMapPos): GenericMapPos<T>;
export declare function toNativeMapPos<T = DefaultLatLonKeys>(position: GenericMapPos<T> | NTMapPos, ignoreAltitude?: boolean): NTMapPos;
export declare function fromNativeScreenPos(position: NTScreenPos): ScreenPos;
export declare function toNativeScreenPos(position: ScreenPos | NTScreenPos): NTScreenPos;
export declare function toNativeMapVec(value: MapVec | [number, number, number]): NTMapVec;
export declare function fromNativeMapVec(value: NTMapVec): MapVec;
export declare function fromNativeMapBounds<T = DefaultLatLonKeys>(bounds: NTMapBounds): MapBounds<T>;
export declare function toNativeMapBounds<T = DefaultLatLonKeys>(bounds: MapBounds<T>): NTMapBounds;
export declare function fromNativeScreenBounds(bounds: NTScreenBounds): ScreenBounds;
export declare function toNativeScreenBounds(bounds: ScreenBounds): NTScreenBounds;
export declare abstract class NativeVector<T, U = any> extends BaseNative<U, {}> {
constructor(native: any);
createNative(options: any): any;
size(): any;
reserve(size: number): any;
get(index: number): T;
add(position: T): any;
capacity(): any;
clear(): any;
isEmpty(): any;
set(index: number, position: T): any;
}
export declare class MapPosVector<T = DefaultLatLonKeys> extends NativeVector<NTMapPos, NTMapPosVector> {
createNative(): NTMapPosVector;
add(position: NTMapPos | GenericMapPos<T>): void;
getPos(index: number): GenericMapPos<T>;
toArray(): GenericMapPos<T>[];
}
export declare class MapPosVectorVector<T = DefaultLatLonKeys> extends NativeVector<NTMapPosVector, NTMapPosVectorVector> {
createNative(): NTMapPosVectorVector;
add(position: NTMapPosVector | MapPosVector<T>): void;
}