import { BaseNative } from '..'; import { Projection } from '../projections'; import { FeatureCollection } from '../geometry/feature'; export interface DataSourceOptions { minZoom?: number; maxZoom?: number; } export interface TileDataSourceOptions extends DataSourceOptions { maxOverzoomLevel?: number; encoding?: string; } export abstract class DataSource extends BaseNative { getProjection(): Projection; } export class TileDataSource extends DataSource { minZoom?: number; maxZoom?: number; maxOverzoomLevel?: number; encoding?: string; loadTile(x, y, z): any; } export interface OrderedTileDataSourceOptions extends TileDataSourceOptions { dataSources: TileDataSource[]; } export interface CombinedTileDataSourceOptions extends TileDataSourceOptions { dataSources: TileDataSource[]; zoomLevel: number; } export interface MultiTileDataSourceOptions extends TileDataSourceOptions { maxOpenedPackages?: number; } export class OrderedTileDataSource extends TileDataSource {} export interface MergedMBVTTileDataSourceOptions extends TileDataSourceOptions { dataSources: TileDataSource[]; } export class MergedMBVTTileDataSource extends TileDataSource {} export class CombinedTileDataSource extends TileDataSource {} export class MultiTileDataSource extends TileDataSource { maxOpenedPackages: number; add(source: TileDataSource, tileMask?: string); remove(source: TileDataSource); } export interface GeoJSONVectorTileDataSourceOptions extends TileDataSourceOptions { simplifyTolerance?: number; defaultLayerBuffer?: number; } export class GeoJSONVectorTileDataSource extends TileDataSource { simplifyTolerance: number; defaultLayerBuffer: number; createLayer(name: string): number; deleteLayer(index: number); setLayerFeatureCollection(layerIndex: number, projection: Projection, featureCollection: FeatureCollection); setLayerGeoJSON(layerIndex: number, geoJSON: object); setLayerGeoJSONString(layerIndex: number, geoJSON: string | object); addGeoJSONFeature(layerIndex: number, geoJSON: object); addGeoJSONStringFeature(layerIndex: number, geoJSON: string | object); updateGeoJSONFeature(layerIndex: number, geoJSON: object); updateGeoJSONStringFeature(layerIndex: number, geoJSON: string | object); removeGeoJSONFeature(layerIndex: number, id: string | number); }