Design comparison
SolutionDesign
Solution retrospective
I didn't manage to make it work with React. Did somebody manage to get it done ?
Community feedback
- @lissajous-laserPosted about 2 years ago
Did you try to use React Leaflet? It's a module that lets you use leaflet like a React component.
link: https://react-leaflet.js.org
0@ceimiplacePosted about 2 years ago@lissajous-laser i have tried but didn't work. Will give it another go
0@lissajous-laserPosted about 2 years ago@ceimiplace I copy and pasted their code from the setup page to start, and made sure I had width and height dimensions in the css.
<MapContainer center={[51.505, -0.09]} zoom={13} scrollWheelZoom={false}> <TileLayer attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" /> <Marker position={[51.505, -0.09]}> <Popup> A pretty CSS3 popup. <br /> Easily customizable. </Popup> </Marker> </MapContainer>
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord