@geogirafe/lib-geoportal
Version:
GeoGirafe is a flexible application to build online geoportals.
36 lines (35 loc) • 1.53 kB
TypeScript
import IGirafeContext from '../context/icontext.js';
import Feature from 'ol/Feature.js';
import AbstractSearchClient, { BaseSearchClientConfig } from './abstractsearchclient.js';
export type GmfSearchClientConfig = BaseSearchClientConfig & {
type: 'geomapfish';
};
/**
* A search provider for the GeoMapFish backend.
* Extends the AbstractSearchClient and provides methods tailored to processing GMF-specific search results.
*
* Configuration:
* - providerName: The name of the search provider, or geomapfish.
* - url: The URL of the GMF search service.
* - resultSrid: The spatial reference system (SRID) of the search results. Default same as map SRID.
*/
declare class GmfSearchClient extends AbstractSearchClient {
protected searchFilterQueryParameter: string;
private readonly layerTreeCategory;
constructor(context: IGirafeContext, config: GmfSearchClientConfig);
/**
* Create the search capabilities URL by using the search URL and appending '/capabilities' to it.
*/
private get searchCapabilitiesUrl();
/**
* Returns a list of categories that can be searched by
*/
getSearchCategories(): Promise<string[]>;
/**
* If the search request should filter results by layer tree elements, the URL needs to include an additional parameter
* `null_category` to include layer results.
*/
protected buildRequestUrl(term: string, filter: string[]): URL;
groupedResults(results: Feature[]): Record<string, Feature[]>;
}
export default GmfSearchClient;