import { BaseNative } from '..'; import { VectorTileLayer } from '../layers/vector'; import { TileDataSource } from '../datasources'; import { VectorTileDecoder } from '../vectortiles'; import { Projection } from '../projections'; import { Geometry } from '../geometry'; import { Feature, FeatureCollection, VectorTileFeatureCollection } from '../geometry/feature'; import { MapPos } from '../core'; export interface SearchRequest { projection?: Projection; regexFilter?: string; filterExpression?: string; searchRadius?: number; geometry?: Geometry; position?: MapPos; } export interface SearchServiceOptions { // metaData?: { [k: string]: string }; } export interface VectorTileSearchServiceOptions extends SearchServiceOptions { // metaData?: { [k: string]: string }; layer?: VectorTileLayer; dataSource?: TileDataSource; decoder?: VectorTileDecoder; minZoom?: number; maxZoom?: number; } // export abstract class BaseSearchService extends BaseNative {} export class VectorTileSearchService extends BaseNative { minZoom?: number; maxZoom?: number; findFeatures(options: SearchRequest, callback?: (res: VectorTileFeatureCollection) => void): VectorTileFeatureCollection; } export interface FeatureCollectionSearchServiceOptions { projection: Projection; features: FeatureCollection } export class FeatureCollectionSearchService extends BaseNative { findFeatures(options: SearchRequest, callback?: (res: FeatureCollection) => void): FeatureCollection; }