hmpps-open-layers-map
Version:
A native Web Component for displaying maps using OpenLayers or MapLibre.
40 lines (39 loc) • 1.15 kB
TypeScript
import VectorLayer from 'ol/layer/Vector';
import VectorSource from 'ol/source/Vector';
import type Feature from 'ol/Feature';
import type Geometry from 'ol/geom/Geometry';
import type { ComposableLayer } from './base';
import type { MapAdapter } from '../map-adapter';
import Position from '../types/position';
type OLVecSource = VectorSource<Feature<Geometry>>;
type OLVecLayer = VectorLayer<OLVecSource>;
export type NumberingLayerOptions = {
id?: string;
title?: string;
visible?: boolean;
zIndex?: number;
style?: {
fill: string;
font: string;
stroke: {
color: string;
width: number;
};
offset: {
x: number;
y: number;
};
};
numberProperty?: string;
positions: Array<Position>;
};
export declare class NumberingLayer implements ComposableLayer<OLVecLayer> {
readonly id: string;
private readonly options;
private olLayer?;
constructor(options: NumberingLayerOptions);
getNativeLayer(): OLVecLayer | undefined;
attach(adapter: MapAdapter): void;
detach(adapter: MapAdapter): void;
}
export {};