@itwin/geo-tools-react
Version:
React Geospatial Tools
29 lines • 1.35 kB
TypeScript
import { Cartographic } from "@itwin/core-common";
import type { MapCartoRectangle } from "@itwin/core-frontend";
import type { AddressProvider, AddressRequest, AddressData, GeoCoder, AddressProviderViewContext } from "./AddressProvider";
/**
* Information requiered to retreive location from Google Places API.
**/
export interface GoogleAddressData extends AddressData {
placeId: string;
}
/**
* Address provider for Google Places API.
* It supports address suggestions and location retrieval based on place IDs.
*/
export declare class GoogleAddressProvider implements AddressProvider {
private _radius;
private _apiKey;
readonly hasAddressIds = true;
constructor(locationBiasRadius?: number);
supportsAddressLocation(): this is GeoCoder;
private isGoogleBaseMap;
isDisabled(context: AddressProviderViewContext): boolean;
protected getAuthRequestHeader(): Promise<Record<string, string>>;
protected getPlacesBaseUrl(): Promise<string>;
getLocation(data: GoogleAddressData): Promise<Cartographic>;
protected getPlacesAutoCompleteUrl(): Promise<string>;
protected getSuggestionsRequest(query: string, viewRect: MapCartoRectangle): Promise<AddressRequest>;
getSuggestions(query: string, userView: MapCartoRectangle): Promise<AddressData[]>;
}
//# sourceMappingURL=GoogleAddressProvider.d.ts.map