fix: Await asynchronous calls in ProjectViewPage and remove redundant Leaflet imports in WMSLayer
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user