/** * @module terra-draw-google-maps-adapter */ import { TerraDrawChanges, SetCursor, TerraDrawStylingFunction, TerraDrawExtend } from "terra-draw"; export declare class TerraDrawGoogleMapsAdapter extends TerraDrawExtend.TerraDrawBaseAdapter { constructor(config: { lib: typeof google.maps; map: google.maps.Map; forwardMapElementEvents?: boolean; isolatedData?: boolean; } & TerraDrawExtend.BaseAdapterConfig); private _forwardMapElementEvents; private _isolatedData; private _data; private _cursor; private _cursorStyleSheet; private _lib; private _map; private _overlay; private _mapEventElement; private _markerClickListener; private _markerMouseMoveListener; private _pointerCaptureDownListener; private _pointerCaptureUpListener; private _clickEventListener; private _mouseMoveEventListener; private _readyCalled; private _interactiveTargetSelector; private _advancedMarkerElementTag; private get _hasRenderedFeatures(); private getPointerTargetElement; private shouldCapturePointer; /** * Generates an SVG path string for a circle with the given center coordinates and radius. * Based off this StackOverflow answer: https://stackoverflow.com/a/27905268/1363484 * @param cx The x-coordinate of the circle's center. * @param cy The y-coordinate of the circle's center. * @param r The radius of the circle. * @returns The SVG path string representing the circle. */ private circlePath; register(callbacks: TerraDrawExtend.TerraDrawCallbacks): void; protected data(): google.maps.Data; private styling; private style; unregister(): void; /** * Returns the longitude and latitude coordinates from a given PointerEvent on the map. * @param event The PointerEvent or MouseEvent containing the screen coordinates of the pointer. * @returns An object with 'lng' and 'lat' properties representing the longitude and latitude, or null if the conversion is not possible. */ getLngLatFromEvent(event: PointerEvent | MouseEvent): { lng: number; lat: number; } | null; /** * Retrieves the HTML element of the Google Map element that handles interaction events * @returns The HTMLElement representing the map container. */ getMapEventElement(eventType?: "pointerdown" | "pointerup" | "pointermove" | "contextmenu" | "keyup" | "keydown"): HTMLElement; /** * Converts longitude and latitude coordinates to pixel coordinates in the map container. * @param lng The longitude coordinate to project. * @param lat The latitude coordinate to project. * @returns An object with 'x' and 'y' properties representing the pixel coordinates within the map container. */ project(lng: number, lat: number): { x: number; y: number; }; /** * Converts pixel coordinates in the map container to longitude and latitude coordinates. * @param x The x-coordinate in the map container to unproject. * @param y The y-coordinate in the map container to unproject. * @returns An object with 'lng' and 'lat' properties representing the longitude and latitude coordinates. */ unproject(x: number, y: number): { lng: number; lat: number; }; /** * Sets the cursor style for the map container. * @param cursor The CSS cursor style to apply, or 'unset' to remove any previously applied cursor style. */ setCursor(cursor: Parameters[0]): void; /** * Enables or disables the double-click to zoom functionality on the map. * @param enabled Set to true to enable double-click to zoom, or false to disable it. */ setDoubleClickToZoom(enabled: boolean): void; /** * Enables or disables the draggable functionality of the map. * @param enabled Set to true to enable map dragging, or false to disable it. */ setDraggability(enabled: boolean): void; private renderedFeatureIds; /** * Renders GeoJSON features on the map using the provided styling configuration. * Schedules actual mutations into requestAnimationFrame, applying: * deletes -> updates -> creates */ render(changes: TerraDrawChanges, styling: TerraDrawStylingFunction): void; private _rafState?; private clearLayers; /** * Clears the map and store of all rendered data layers * @returns void * */ clear(): void; getCoordinatePrecision(): number; }