All Questions
36
questions
2
votes
6
answers
7k
views
LeafLet implementation on Next JS 13
I trying to implement a LeafLet map component in my Next JS 13.0.1 project, but I'm having a problem with the render of the map component.
In the first load of the map component, this error appears:
...
0
votes
1
answer
75
views
Hide rest of map around country with leaflet.js in next js
I need help please. I would like to hide the other maps and only show the one of Cameroon. I'm using Leaflet and I'm on Next.js to be able to display the map. I saw this page React-Leaflet 4 with ...
0
votes
1
answer
74
views
Next.js React-Leaflet bouncing marker using Leaflet.SmoothMarkerBouncing
I am new to the front-end development, I am trying to get bouncing marker in React-leaflet using
https://www.npmjs.com/package/leaflet.smooth_marker_bouncing/v/1.3.0?activeTab=explore
But I don't have ...
0
votes
1
answer
65
views
Window not defined on build NextJS
I am getting a window not defined error? I do not call window or document anywhere in the code and it works fine in development just errors on build.
ReferenceError: window is not defined
at C:\...
0
votes
0
answers
17
views
React Leaflet NextJS - interactive bug map (unsynchronized images) [duplicate]
I have a small problem, I use leaflet react, but I have this kind of rendering
The first zoom is perfect in itself (complete image, but weird contour), but as soon as I switch to Zoom 1, 2, 3..., I ...
1
vote
2
answers
1k
views
having ReferenceError: window is not defined error for react leaflet during build process
I am using react-leaflet in my nextjs project. The project works perfect on dev mode but when I try to build it it gives ReferenceError: window is not defined. I am also using ssr as false in dynamic ...
0
votes
0
answers
114
views
Icon Marker for Leaflet v4 not showing
I have tried to place custom marker and the default of Leaflet, but still getting crop image in the MapContainer.
Here is my code of custom icon.
import { TileLayer } from "react-leaflet/...
0
votes
0
answers
60
views
Nextjs13 and react leaflet: Dynamic loaded Marker in FeatureGroup unable to call getBounds
I currently play around with the new nextjs13 and the app directory as well as server side only code. In my project i use React leaflet and this cannot be directly used anymore in Nextjs13 (with the ...
0
votes
0
answers
102
views
react leaflet map not rendering properly
Using leaflet seems like I have so issues with marker to correctly render.
Otherwise map render correctly
export default function Map({
zoomActive = false,
zoom = 13,
position,
marker = null,
...
1
vote
0
answers
114
views
Implement rotate on react-leaflet rectangles
My goal is to make the rectangles on the leaflet map rotate. This map is for a concert with a lot of seats and some of them will need to rotated to fit the map photo.
After a lot of research i found ...
1
vote
1
answer
1k
views
How can I fix the 'window is not defined' error while using react-leaflet and Next.js?
I am using Leaflet to generate a Map for my website, but it seems to be causing a window is not defined error.
I have been searching for a while and the cause of this issue appears to be that leaflet ...
0
votes
1
answer
909
views
Next JS Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components)
Trying to get Leaflet JS working in Next JS, getting an error that element type is invalid.
This is where is dynamically import my Map component.
/components/MapDir/index.js
import dynamic from 'next/...
7
votes
2
answers
11k
views
Next.js dynamic import with server-side-rendering turned off not working on production build
I'm currently building a site using the leaflet package. This package however needs the window object. That's why I'm importing a component made with leaflet as a dynamic component with ssr turned off....
1
vote
1
answer
1k
views
window is not defined during build
I am making an IP Address Tracker using Next JS and leaflet.js. Every time I try to deploy my project in Vercel it shows me an error that says:
Build error occurred
ReferenceError: window is not ...
0
votes
1
answer
434
views
How to add Markes to a Leaflet-map with coordinates from database in Next.js?
I have to display markers for all the places in my database. At the moment I can display just one marker.
I maped over the array from database but I do not know how to connecte these two. I would ...