Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { EditControl } from 'react-leaflet-draw';

import { geojsonToWKT } from '@terraformer/wkt';
// Import GeoJSON type
import L from 'leaflet';
import L, { icon } from 'leaflet';
import Icon from 'leaflet/dist/images/marker-icon.png';
import RetinaIcon from 'leaflet/dist/images/marker-icon-2x.png';
import IconShadow from 'leaflet/dist/images/marker-shadow.png';
import { v4 as uuidv4 } from 'uuid';
import type { Feature } from 'geojson';

Expand All @@ -16,6 +19,16 @@ import { useMapParsedGeometries } from 'src/layout/Map/features/geometries/fixed
import { useDataModelBindingsFor } from 'src/utils/layout/hooks';
import { useItemWhenType } from 'src/utils/layout/useNodeItem';

export const markerIcon = icon({
iconUrl: Icon,
iconRetinaUrl: RetinaIcon,
shadowUrl: IconShadow,
iconSize: [25, 41],
iconAnchor: [12, 41],
});

L.Marker.prototype.options.icon = markerIcon;

interface FeatureWithId extends Feature {
properties: {
altinnRowId?: string;
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16458,7 +16458,6 @@ __metadata:
resolution: "systeminformation@npm:5.25.11"
bin:
systeminformation: lib/cli.js
checksum: 10c0/c4d3ed2836dec306d017df66dded9bc0fea40bd5a277e29e9800f6272992cb084e08b8d2a9159ffdc823e75338c2dc9202b697d86504098fb063c1d8830d34d7
conditions: (os=darwin | os=linux | os=win32 | os=freebsd | os=openbsd | os=netbsd | os=sunos | os=android)
languageName: node
linkType: hard
Expand Down
Loading