UNPKG

@nativescript-community/ui-carto

Version:

NativeScript plugin for CARTO Mobile SDK

46 lines (45 loc) 3.12 kB
import { CombinedTileDataSourceOptions, DataSourceOptions, GeoJSONVectorTileDataSourceOptions, MergedMBVTTileDataSourceOptions, MultiTileDataSourceOptions, OrderedTileDataSourceOptions, TileDataSourceOptions } from '.'; import { FeatureCollection } from '../geometry/feature'; import { BaseNative } from '../BaseNative'; import { Projection } from '../projections'; export declare abstract class DataSource<T extends com.carto.datasources.TileDataSource, U extends DataSourceOptions> extends BaseNative<T, U> { getProjection(): any; } export declare class TileDataSource<T extends com.carto.datasources.TileDataSource, U extends TileDataSourceOptions> extends DataSource<T, U> { maxOverzoomLevel: number; createNative(options: any): any; loadTile(x: any, y: any, z: any): com.carto.datasources.components.TileData; get minZoom(): number; set minZoom(value: number); get maxZoom(): number; set maxZoom(value: number); } export declare class OrderedTileDataSource extends TileDataSource<com.carto.datasources.OrderedTileDataSource, OrderedTileDataSourceOptions> { createNative(options: OrderedTileDataSourceOptions): com.carto.datasources.OrderedTileDataSource; } export declare class CombinedTileDataSource extends TileDataSource<com.carto.datasources.CombinedTileDataSource, CombinedTileDataSourceOptions> { createNative(options: CombinedTileDataSourceOptions): com.carto.datasources.CombinedTileDataSource; } export declare class MergedMBVTTileDataSource extends TileDataSource<com.carto.datasources.MergedMBVTTileDataSource, MergedMBVTTileDataSourceOptions> { createNative(options: MergedMBVTTileDataSourceOptions): com.carto.datasources.MergedMBVTTileDataSource; } export declare class GeoJSONVectorTileDataSource extends TileDataSource<com.carto.datasources.GeoJSONVectorTileDataSource, GeoJSONVectorTileDataSourceOptions> { simplifyTolerance: number; defaultLayerBuffer: number; createNative(options: GeoJSONVectorTileDataSourceOptions): com.carto.datasources.GeoJSONVectorTileDataSource; createLayer(name: string): number; setLayerFeatureCollection(layerIndex: number, projection: Projection, featureCollection: FeatureCollection): void; setLayerGeoJSON(layerIndex: number, geoJSON: Object): void; setLayerGeoJSONString(layerIndex: number, geoJSON: string | Object): void; addGeoJSONFeature(layerIndex: number, geoJSON: Object): void; addGeoJSONStringFeature(layerIndex: number, geoJSON: string | Object): void; updateGeoJSONFeature(layerIndex: number, geoJSON: Object): void; updateGeoJSONStringFeature(layerIndex: number, geoJSON: string | Object): void; deleteLayer(index: number): void; removeGeoJSONFeature(layerIndex: number, id: string | number): void; } export declare class MultiTileDataSource extends TileDataSource<com.carto.datasources.MultiTileDataSource, MultiTileDataSourceOptions> { createNative(options: MultiTileDataSourceOptions): com.carto.datasources.MultiTileDataSource; add(source: TileDataSource<any, any>, tileMask?: string): void; remove(source: TileDataSource<any, any>): void; }