UNPKG

@nativescript-community/ui-carto

Version:

NativeScript plugin for CARTO Mobile SDK

23 lines (20 loc) 1.1 kB
import { DataSource, TileDataSourceOptions } from '.'; import { IProjection } from '../projections'; import { VectorElement, VectorElementVector } from '../vectorelements'; import { FeatureCollection } from '../geometry/feature'; import { GeometrySimplifier } from '../geometry/simplifier'; import { DefaultLatLonKeys, MapBounds } from '../core'; export interface VectorDataSourceOptions extends TileDataSourceOptions { projection: IProjection; } export interface LocalVectorDataSourceOptions extends VectorDataSourceOptions {} export abstract class VectorDataSource<T extends any, U extends LocalVectorDataSourceOptions> extends DataSource<T, U> {} export class LocalVectorDataSource<T = DefaultLatLonKeys> extends VectorDataSource<any, LocalVectorDataSourceOptions> { add(element: VectorElement<any, any>); remove(element: VectorElement<any, any>); addAll(element: VectorElementVector); setGeometrySimplifier(simplifier: GeometrySimplifier<any, any>); clear(); addFeatureCollection(featureCollection: FeatureCollection, style: any); getDataExtent(): MapBounds<T>; }