import { Resource } from "@open-pioneer/core"; import { Feature } from "ol"; import { Geometry } from "ol/geom"; import VectorLayer from "ol/layer/Vector"; import VectorSource from "ol/source/Vector"; import { StyleLike } from "ol/style/Style"; import { LayerDependencies } from "../layers/shared/internals"; import { DisplayTarget, MapModel, ZoomOptions } from "./MapModel"; export declare const DESTROY_HIGHLIGHTS: unique symbol; export declare const GET_HIGHLIGHT_LAYER: unique symbol; /** * Style options supported when creating a new {@link Highlight}. * * @group Map Model **/ export interface HighlightOptions { /** * Optional styles to override the default styles. */ highlightStyle?: HighlightStyle; } /** * Options supported by the map model's {@link MapModel.highlightAndZoom | highlightAndZoom} method. * * @group Map Model **/ export interface HighlightZoomOptions extends HighlightOptions, ZoomOptions { } /** * Custom styles when creating a new {@link Highlight}. * * @group Map Model */ export type HighlightStyle = { Point?: StyleLike; LineString?: StyleLike; Polygon?: StyleLike; MultiPolygon?: StyleLike; MultiPoint?: StyleLike; MultiLineString?: StyleLike; }; /** * Represents the additional graphical representations of objects. * * See also {@link MapModel.highlight}. * * @group Map Model */ export interface Highlight extends Resource { /** Returns `true` if the highlight has not been destroyed yet. */ readonly isActive: boolean; /** Updates the style of the highlight. Use `undefined` to revert to the default style. */ setStyle(style: HighlightStyle | undefined): void; } /** * Manages highlights on the map. * * @group Map Model */ export declare class Highlights { #private; constructor(map: MapModel, layerDeps: LayerDependencies); [DESTROY_HIGHLIGHTS](): void; /** * Creates a highlight at the given targets. * * A highlight is a temporary graphic on the map that calls attention to a point or an area. * * Call `destroy()` on the returned highlight object to remove the highlight. */ add(displayTargets: DisplayTarget[], options?: HighlightOptions | undefined): Highlight; /** * Creates a highlight and zooms to the given targets. * * See also {@link add} and {@link MapModel.zoom}. */ addAndZoom(displayTarget: DisplayTarget[], options?: HighlightZoomOptions | undefined): Highlight; /** * This method destroys all active Highlights. */ clear(): void; /** * Returns the layer used for highlights. */ [GET_HIGHLIGHT_LAYER](): VectorLayer>, Feature>; }