Skip to main content

All Questions

Tagged with
0 votes
1 answer
73 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 ...
Anthony Tcheuha's user avatar
0 votes
1 answer
67 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 ...
Dark_shadow_side's user avatar
0 votes
1 answer
59 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:\...
canadianbleach's user avatar
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 ...
Mateo's user avatar
  • 35
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 ...
Mubashir Rehman's user avatar
0 votes
0 answers
113 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/...
Manfre's user avatar
  • 684
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 ...
Marcel's user avatar
  • 377
0 votes
0 answers
101 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, ...
Michal Sakowski's user avatar
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 ...
Magnus Pladsen's user avatar
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 ...
Ahmad Nasser's user avatar
0 votes
1 answer
876 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/...
OUallas's user avatar
0 votes
1 answer
430 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 ...
Ida's user avatar
  • 1
1 vote
1 answer
594 views

react-leaflet throwing errors under nextjs13

I am trying to get a Leaflet map running under the new NextJS13 thinking with the distinctly declared client-side functions it should save me some trouble. But i cant get it to work. my map component ...
a.urbanite's user avatar
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: ...
João Danilo Zucolotto's user avatar
0 votes
1 answer
1k views

How to refactor React Leaflet GeoJSON component to use the useMap function with Next.js?

I'm working on a React-Leaflet application using Next.js and I'm struggling to refactor my GeoJSON component to be able to implement a 'zoom to feature' event using the useMap function. The React-...
nizz0k's user avatar
  • 511

15 30 50 per page