diff --git a/src/components/BoxMenu.tsx b/src/components/BoxMenu.tsx
index 9571e26..fddbcc9 100644
--- a/src/components/BoxMenu.tsx
+++ b/src/components/BoxMenu.tsx
@@ -6,7 +6,7 @@ import {
SubmapFileExtensions,
} from '../configs/submapConfigs';
import { downloadSubmap } from '../utils/fetchUtils';
-import { transformBoxes } from '../utils/layerUtils';
+import { transformBoxCoords } from '../utils/layerUtils';
import { Map } from 'ol';
type BoxMenuProps = {
@@ -42,7 +42,7 @@ export function BoxMenu({
const onDownloadClick = useCallback(
(ext: SubmapFileExtensions) => {
if (submapData) {
- const boxPosition = transformBoxes(boxData, flipped);
+ const boxPosition = transformBoxCoords(boxData, flipped);
downloadSubmap(
{
...submapData,
diff --git a/src/components/OpenLayersMap.tsx b/src/components/OpenLayersMap.tsx
index 24f5d50..92e30bc 100644
--- a/src/components/OpenLayersMap.tsx
+++ b/src/components/OpenLayersMap.tsx
@@ -56,6 +56,7 @@ import {
import { ToggleSwitch } from './ToggleSwitch';
import { CenterMapFeature } from './CenterMapFeature';
import { getHistogramData } from '../utils/fetchUtils';
+import { AperturesLayer } from './layers/AperturesLayer';
export type MapProps = {
mapGroups: MapGroupResponse[];
@@ -534,6 +535,11 @@ export function OpenLayersMap({
externalSearchMarkerRef={externalSearchMarkerRef}
flipped={flipTiles}
/>
+
+
+
+
+
+
+ );
+}
diff --git a/src/components/layers/AperturesLayer.tsx b/src/components/layers/AperturesLayer.tsx
new file mode 100644
index 0000000..b266bfe
--- /dev/null
+++ b/src/components/layers/AperturesLayer.tsx
@@ -0,0 +1,355 @@
+import { useEffect, useState, useRef, useCallback } from 'react';
+import { Map } from 'ol';
+import { ApertureIcon } from '../icons/ApertureIcon';
+import Draw from 'ol/interaction/Draw';
+import VectorSource from 'ol/source/Vector';
+import VectorLayer from 'ol/layer/Vector';
+import { Style, Stroke, Text, Fill } from 'ol/style';
+import { Circle } from 'ol/geom';
+import { SERVICE_URL } from '../../configs/mapSettings';
+import {
+ transformCoords,
+ transformFeatureCoords,
+} from '../../utils/layerUtils';
+import Select from 'ol/interaction/Select';
+import { click } from 'ol/events/condition';
+import Feature from 'ol/Feature';
+import type { FeatureLike } from 'ol/Feature';
+import '../styles/aperture-layer.css';
+import { Coordinate } from 'ol/coordinate';
+
+type AperturesLayerProps = {
+ mapRef: React.RefObject