import { LolOpenLayersViewDef } from "../viewDefinition/LolOpenLayersViewDef"; import { ReactElement, ReactNode } from "react"; import { AutoLabelPlacementType, ClickedFeature } from "../context/LolOpenLayersMapContext"; import { LolOpenLayersLayerDef, LolOpenLayersLayerGroupDef } from "../layerDefinition/LolOpenLayersLayerDef"; import "./LolOpenLayersMap.scss"; import { QueryClient } from "@tanstack/react-query"; import { LolOpenLayersDrawInteraction, LolOpenLayersModifyInteraction, LolOpenLayersSnapInteraction } from "../interactionDefinition/LolOpenLayersInteractionDef"; export interface IShape { /** a GeoJSON object */ shape?: Record | null; } /** * Properties for {@link LolOpenLayersMap} */ export interface LolOpenLayersMapProps { /** children will be inserted into the DOM after the `map` div */ children?: ReactNode; /** Defines the view with initial viewport coordinates, projection and scale */ view: LolOpenLayersViewDef; /** Defines the Tile, VectorTile and Vector layers that make up the map */ layers: LolOpenLayersLayerDef[]; /** Group layers into a collection that are handled together in Openlayers, * see https://openlayers.org/en/latest/apidoc/module-ol_layer_Group-LayerGroup.html */ layerGroup?: LolOpenLayersLayerGroupDef; /** Indicated if the map component should manage the loading indicator */ useLoadingIndicator?: boolean; /** Use the QueryClient of the parent - required if using queries*/ queryClient?: QueryClient; /** Buffer the default zoom to bufferfactor, e.g. 1.1 leaves a 10% margin, default is 1.05 **/ bufferFactor?: number; /** Interactions for draw **/ drawInteraction?: LolOpenLayersDrawInteraction; /** Interactions for snap **/ snapInteraction?: LolOpenLayersSnapInteraction; /** Interactions for modify **/ modifyInteraction?: LolOpenLayersModifyInteraction; /** For testing, mock the map rather than using Openlayers **/ mock?: boolean; /** Enable an openlayers Overlay which can have its element accessed (to set contents, etc) * with mapContext.getOverlayRef * https://openlayers.org/en/latest/apidoc/module-ol_Overlay-Overlay.html */ withOverlay?: boolean; /** Show default zoom control or not */ withDefaultZoom?: boolean; /** disable zoom on double click */ disableDoubleClickZoom?: boolean; /** Map z index */ mapZIndex?: number; /** enable auto placement */ enableAutoPlacement?: boolean; /** configuration for absolute or offset label placements */ autoLabelPlacementType?: AutoLabelPlacementType; /** Show only placed labels, hide unplaced */ showOnlyPlacedLabels?: boolean; /** Function to set custom feature selection priority */ sortFeaturesBySelectionPriority?: (features: ClickedFeature[]) => ClickedFeature[]; /** The default data projection, defaulted to EPSG:1 for offset degrees * EPSG:4326 for regular WGS84 (can also be used for NZTM) */ defaultDataProjection?: string; } /** * React wrapper for the openlayers https://openlayers.org/en/latest/apidoc/ library * to render interactive maps * * @param props The React properties */ export declare const LolOpenLayersMap: (props: LolOpenLayersMapProps) => ReactElement;