import { ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2 } from "@angular/core"; import { ControlValueAccessor } from "@angular/forms"; import { LocationViewerMapService, LocationViewerMap, SupportingLayerOptions, OperationalLayerOptions, FilterLayerOptions, NgxLocationViewerComponent } from "@acpaas-ui-widgets/ngx-location-viewer"; import { NgxLocationPickerService } from "../services/ngx-location-picker.service"; import { FeatureLayerModel } from "../types/feature-layer.model"; import { LocationModel } from "../types/location.model"; import { AddressModel, LatLngModel } from "../types/address.model"; import { CoordinateModel } from "../types/coordinate.model"; import { NotificationModel } from "../types/notification.model"; import { NgxLocationPickerHelper } from "../services/ngx-location-picker.helper"; import { LeafletTileLayerModel } from "../types/leaflet-tile-layer.model"; import { CascadingCoordinateRulesModel } from "../types/cascading-rules.model"; import { TrackingOptions } from "../types/tracking-options.model"; import { LatLngExpression } from "leaflet"; import * as i0 from "@angular/core"; export declare class NgxLocationPickerComponent implements OnInit, OnDestroy, ControlValueAccessor { private locationPickerService; private locationPickerHelper; private locationViewerService; private renderer; baseUrl: any; defaultZoom: number; /** * The zoom level when a location is selected. * If null the zoomlevel won't change after location selection. */ onSelectZoom?: number; changeZoomLevelOnLocationSelect: boolean; mapCenter: LatLngExpression; hasSidebar: boolean; showMap: boolean; showClearInputButton: boolean; /** * Add layers to show on the map. eg: A-card terminals, Velo stations, ... * A single featureLayer consists of: * * url: the url to the mapServer containing the features to be shown on the map. * icon: the marker to use to show featureLayer locations. * * An icon should include: Streamline icon class, the icon color (default: #0064B) and the icon size (default: 40px) * see: FeatureLayerIconModel */ featureLayers: FeatureLayerModel[]; placeholder: string; noResultsLabel: string; defaultOptionLabel: string; clearInputAriaLabel: string; locationPickAriaLabel: string; zoomInAriaLabel: string; zoomOutAriaLabel: string; textInputAriaLabel: string; locateMeAriaLabel: string; locatingAriaLabel: string; locateMeNotSupportedNotification: string; locateMeNotAllowedNotification: string; locateMeUnavailableNotification: string; locateMeTimeoutNotification: string; locateMeUnknownNotification: string; coordinateErrorNotification: string; zoomInfoNotification: string; defaultTileLayerLabel: string; tileLayer: LeafletTileLayerModel; tileLayerIsVectorBased: boolean; minInputLength: number; locationsLimit: number; locationLayers: string[]; /** * Prioritize specific layers, boosts results from given layers to the top of the found locations. * The order of the values in the array determines the priority. Overrides sortBy. */ prioritizeLayers: string[]; sortBy: string; onlyAntwerp: boolean; countryCodes: string[]; bufferSearch?: number; coordinateSearch?: LatLngModel; locateUserOnInit: boolean; debounceTime: number; cascadingCoordinateReturnSingle: boolean; cascadingCoordinateLimit: number; cascadingCoordinateRules: CascadingCoordinateRulesModel[]; cascadingCoordinateGuid: string; geoApiBaseUrl: string; showLayerManagement: boolean; showSelectionTools: boolean; showMeasureTools: boolean; showWhatIsHereButton: boolean; supportingLayerOptions: SupportingLayerOptions; operationalLayerOptions: OperationalLayerOptions; filterLayers: FilterLayerOptions[]; addCoordinateToResultsAt?: number; locationKeywords: string[]; searchStreetNameForAddress: boolean; positionOptions: TrackingOptions; trackPosition: boolean; addPolygon: EventEmitter; addLine: EventEmitter; editFeature: EventEmitter; locationSelect: EventEmitter; filteredResult: EventEmitter; locationViewer: NgxLocationViewerComponent; leafletSearchField: ElementRef; leafletMap: LocationViewerMap; searching: boolean; didSearch: boolean; pickLocationActive: boolean; pickedLocation: boolean; isLocating: boolean; foundLocations: LocationModel[] | AddressModel[] | CoordinateModel[]; leafletNotification: NotificationModel; highlightedLocationResult: number; private searchQueryChanged; private mapLoaded; private geoLocate; private geoLocateId?; private cachedPosition; private selectedLocationMarker; private calculatedLocationMarker; private selectedLocationGeometry; private inputChangeSubscription; private locationServiceSubscription; private _selectedLocation; private previousLocation; private cursorOnLeaflet; private proximityCircle; private proximityCenter; private clearWatchTimeoutId; propagateChange: (_: any) => void; get selectedLocation(): any; set selectedLocation(location: any); get selectedLocationLabel(): string; set selectedLocationLabel(value: string); /** * Checks if input field has a value */ get inputHasValue(): boolean; /** * Checks if foundLocations array has items. */ get hasResults(): boolean; /** * NgxLocationPickerComponent constructor, injects required dependencies */ constructor(locationPickerService: NgxLocationPickerService, locationPickerHelper: NgxLocationPickerHelper, locationViewerService: LocationViewerMapService, renderer: Renderer2); /** * On component init */ ngOnInit(): void; /** * On component destroy */ ngOnDestroy(): void; /** * Writes a new value to the element. */ writeValue(location: any, reset?: boolean): void; /** * Registers a callback function that is called when the control's value changes in the UI. */ registerOnChange(fn: any): void; /** * Registers a callback function is called by the forms API on initialization to update the form model on blur. */ registerOnTouched(): void; /** * Zooms the map in */ zoomIn(): void; /** * Zooms the map out */ zoomOut(): void; /** * On input change event */ onInputChange(query: string): void; /** * Clear search field value, If map is visible, resets to it's original position. */ emptyField(): void; /** * Allows location search by clicking somewhere on the map. */ pickLocationOnMap(): void; /** * Tries to determine the current users position */ getDeviceLocation(): void; /** * Trigger search when input string is longer than 2 characters */ onSearch(searchValue: any, forcedCoordinateSearch?: boolean): void; protected setDidSearch(): void; /** * When a location is selected from the list. */ protected onLocationSelect($event: Event, selectedLocation: any, didSearch?: boolean): void; /** * When a result is filtered in location-viewer. */ onResultFiltered($event: any): void; /** * Implements keyboard and mouse commands */ onKeyCommand(event: any): void; /** * Determines whether the cursor is hovering over the leaflet instance or not. */ isCursorOnLeaflet(cursorOnLeaflet: boolean): void; /** * Close the notification manually */ closeNotification(): void; /** * Clear watch user position */ private clearWatch; /** * Init leaflet map with default values and register feature layers if provided. */ private initLocationPicker; /** * Triggers a search with latest position of device */ private searchWithCachedPosition; /** * Triggers a search when selectedLocation was updated from outside our component. */ private setInitialLocation; /** * Capture coordinates from clicking the map and run a search. */ private registerMapClick; /** * Sets a dynamically fetched location when using locate-me or pick location on map */ private setLocationDynamically; /** * Sets leaflet map view to selected coords. With preferred zoomlevel. */ private setView; /** * Registers optional feature layers and adds markers to the leaflet instance. */ private registerFeatureLayers; /** * Adds a marker on a given coordinate and zooms in on this location. * * @param coords array containing lat & lng * @param location the selected location * @param keepGeometry whether or not to remove existing geometry * @param keepMarker whether or not to remove existing marker * @param marker the marker styling itself */ private addMapMarker; private addResultMarker; /** * Adds proximity circle to show the accuracy of received coordinates */ private showProximityCircle; /** * Removes the proximity circle from the map */ private removeProximityCircle; /** * Defines the custom marker markup. */ private createMarker; private createPinMarker; /** * Removes specific marker from leaflet instance. */ private removeMarker; /** * Add found geo shape to leaflet and determine center coordinates */ private addMapGeoJson; /** * Resets found locations to empty array */ private resetFoundLocations; /** * Resets properties related to location search */ private resetLocationSearchFields; /** * Removes added geometry area from leaflet instance. */ private removeGeometry; /** * Cancels geolocation if currently running */ private cancelGeolocation; /** * Removes and adds the expected events after cancelling picking */ private cancelPickingEvents; /** * Show a notification on the leaflet map. */ private setNotification; /** * Does the input check on to see if given input equals to the current selected street name */ private inputStringEqualsSelectedStreetName; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }