@maptiler/geocoding-control
Version:
The Javascript & TypeScript Map Control component for MapTiler Geocoding service. Easy to be integrated into any JavaScript mapping application.
74 lines (73 loc) • 3.74 kB
TypeScript
import { Feature as OlFeature } from 'ol';
import { default as OLEvent } from 'ol/events/Event';
import { Point as OlPoint } from 'ol/geom';
import { MaptilerGeocoderEvent } from '../geocoder/geocoder-events';
import { Feature } from '../types';
import { OpenLayersGeocodingControl } from './openlayers-control';
type BaseEvent = OLEvent & {
target: OpenLayersGeocodingControl;
};
export declare namespace OpenLayersGeocodingControlEvent {
type ReverseToggleEvent = BaseEvent & MaptilerGeocoderEvent.ReverseToggleEvent["detail"];
type QueryChangeEvent = BaseEvent & MaptilerGeocoderEvent.QueryChangeEvent["detail"];
type QueryClearEvent = BaseEvent;
type RequestEvent = BaseEvent & MaptilerGeocoderEvent.RequestEvent["detail"];
type ResponseEvent = BaseEvent & MaptilerGeocoderEvent.ResponseEvent["detail"];
type SelectEvent = BaseEvent & MaptilerGeocoderEvent.SelectEvent["detail"];
type PickEvent = BaseEvent & MaptilerGeocoderEvent.PickEvent["detail"];
type FeaturesShowEvent = BaseEvent;
type FeaturesHideEvent = BaseEvent;
type FeaturesListedEvent = BaseEvent & MaptilerGeocoderEvent.FeaturesListedEvent["detail"];
type FeaturesClearEvent = BaseEvent;
type FocusInEvent = BaseEvent;
type FocusOutEvent = BaseEvent;
type MarkerClickEvent = BaseEvent & {
feature: Feature;
marker: OlFeature<OlPoint>;
};
type MarkerMouseEnterEvent = BaseEvent & {
feature: Feature;
marker: OlFeature<OlPoint>;
};
type MarkerMouseLeaveEvent = BaseEvent & {
feature: Feature;
marker: OlFeature<OlPoint>;
};
}
export type ReverseToggleEvent = OpenLayersGeocodingControlEvent.ReverseToggleEvent;
export type QueryChangeEvent = OpenLayersGeocodingControlEvent.QueryChangeEvent;
export type QueryClearEvent = OpenLayersGeocodingControlEvent.QueryClearEvent;
export type RequestEvent = OpenLayersGeocodingControlEvent.RequestEvent;
export type ResponseEvent = OpenLayersGeocodingControlEvent.ResponseEvent;
export type SelectEvent = OpenLayersGeocodingControlEvent.SelectEvent;
export type PickEvent = OpenLayersGeocodingControlEvent.PickEvent;
export type FeaturesShowEvent = OpenLayersGeocodingControlEvent.FeaturesShowEvent;
export type FeaturesHideEvent = OpenLayersGeocodingControlEvent.FeaturesHideEvent;
export type FeaturesListedEvent = OpenLayersGeocodingControlEvent.FeaturesListedEvent;
export type FeaturesClearEvent = OpenLayersGeocodingControlEvent.FeaturesClearEvent;
export type FocusInEvent = OpenLayersGeocodingControlEvent.FocusInEvent;
export type FocusOutEvent = OpenLayersGeocodingControlEvent.FocusOutEvent;
export type MarkerClickEvent = OpenLayersGeocodingControlEvent.MarkerClickEvent;
export type MarkerMouseEnterEvent = OpenLayersGeocodingControlEvent.MarkerMouseEnterEvent;
export type MarkerMouseLeaveEvent = OpenLayersGeocodingControlEvent.MarkerMouseLeaveEvent;
export type OpenLayersGeocodingControlEventNameMap = {
reversetoggle: ReverseToggleEvent;
querychange: QueryChangeEvent;
queryclear: QueryClearEvent;
request: RequestEvent;
response: ResponseEvent;
select: SelectEvent;
pick: PickEvent;
featuresshow: FeaturesShowEvent;
featureshide: FeaturesHideEvent;
featureslisted: FeaturesListedEvent;
featuresclear: FeaturesClearEvent;
focusin: FocusInEvent;
focusout: FocusOutEvent;
markerclick: MarkerClickEvent;
markermouseenter: MarkerMouseEnterEvent;
markermouseleave: MarkerMouseLeaveEvent;
};
export type OpenLayersGeocodingControlEvent = OpenLayersGeocodingControlEventNameMap[keyof OpenLayersGeocodingControlEventNameMap];
export type OpenLayersGeocodingControlEventName = keyof OpenLayersGeocodingControlEventNameMap;
export {};