fix: Await asynchronous calls in ProjectViewPage and remove redundant Leaflet imports in WMSLayer

This commit is contained in:
2025-06-25 13:43:27 +02:00
parent 988a4eb71b
commit 44bc7b3e7c
2 changed files with 2 additions and 6 deletions

View File

@@ -56,8 +56,6 @@ function WMSLayer({ url, params, opacity = 1, attribution }) {
// Fix for default markers in react-leaflet
const fixLeafletIcons = () => {
if (typeof window !== "undefined") {
const L = require("leaflet");
delete L.Icon.Default.prototype._getIconUrl;
L.Icon.Default.mergeOptions({
iconRetinaUrl: "/leaflet/marker-icon-2x.png",
@@ -70,8 +68,6 @@ const fixLeafletIcons = () => {
// Create colored marker icons
const createColoredMarkerIcon = (color) => {
if (typeof window !== "undefined") {
const L = require("leaflet");
return new L.Icon({
iconUrl: `data:image/svg+xml;base64,${btoa(`
<svg width="25" height="41" viewBox="0 0 25 41" xmlns="http://www.w3.org/2000/svg">