React components for Leaflet maps

Overview
Comments
  • 3D Buildings

    3D Buildings

    Hi Some time ago, one of my colleagues asked a question about the 3D buildings of your library, which you did not answer. I've also asked on stackoverflow, but still no answers. How can we build 3D buildings on polygons?

    opened by m6hdix 1
  • Minified React error #419

    Minified React error #419

    Bug report in v4

    Before opening an issue, make sure to read the contributing guide and understand this is a bug tracker, not a support platform.

    Please make sure to check the following boxes before submitting an issue.
    Issues opened without using this template will be closed unless they have a good reason not to follow this template.

    • [x] All peer dependencies are installed: React, ReactDOM and Leaflet.
    • [x] Using the latest version of React and ReactDOM v18.
    • [x] Using the supported version of Leaflet (v1.8.0 minimum) and its corresponding CSS file is loaded.
    • [x] Using the latest v4 version of React-Leaflet.
    • [x] The issue has not already been reported.
    • [x] Make sure you have followed the quick start guide for Leaflet.
    • [x] Make sure you have fully read the documentation and that you understand the limitations.

    Expected behavior

    No error

    Actual behavior

    I'm using NextJS 13.0.7, dynamically import MapContainer component without SSR. I get this error only in production build

    Steps to reproduce

    Just use the basic example image

    opened by khuongtp 0
  • React leaflet does not render properly, not functioning

    React leaflet does not render properly, not functioning

    Bug report in v4

    Expected behavior

    Should function as leaflet JS.

    Actual behavior

    Broken maps, not functioning at all

    Steps to reproduce

    Go quickly to the sandbox and you will know quickly: https://codesandbox.io/s/react-leaflet-bug-sw6i8o?file=/src/App.js

    image

    opened by inovramadani 5
  • Adding gradient to the map (Help needed)

    Adding gradient to the map (Help needed)

    So I have coded a map using react-leaflet and I and I am trying to add gradient when the user clicks on the map but unfortunately, it's not working Here is the code

    const style = (feature: any) => {
        return {
          fillColor:
            feature?.properties.StateName === stateName ? "red" : "green",
          // ? linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,41,121,1) 39%, rgba(17,68,87,1) 65%, rgba(0,212,255,1) 81%)
          // : linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(121,111,9,1) 35%, rgba(0,212,255,1) 100%),
          weight: 1,
          opacity: 1,
          color:
            feature?.properties.StateName === stateName ? "#FFFFFF" : "#252117",
          border: "0.1px solid #000000",
        };
      };
    // passing to component like this 
     <GeoJSON
            key={index}
            data={boundary}
            style={style}
            onEachFeature={eachFeature}
          />
    

    How can I add a gradient? Note: Red and green colors are working as per the need but when I switch them with the desired gradient I get a black map

    opened by MubashirWaheed 0
  • App crashes after zooming out a few times

    App crashes after zooming out a few times

    Bug report in v4

    Before opening an issue, make sure to read the contributing guide and understand this is a bug tracker, not a support platform.

    Please make sure to check the following boxes before submitting an issue.
    Issues opened without using this template will be closed unless they have a good reason not to follow this template.

    • [x] All peer dependencies are installed: React, ReactDOM and Leaflet.
    • [x] Using the latest version of React and ReactDOM v18.
    • [x] Using the supported version of Leaflet (v1.8.0 minimum) and its corresponding CSS file is loaded.
    • [x] Using the latest v4 version of React-Leaflet.
    • [x] The issue has not already been reported.
    • [x] Make sure you have followed the quick start guide for Leaflet.
    • [x] Make sure you have fully read the documentation and that you understand the limitations.

    Expected behavior

    I expect to be able to zoom out more than two times and the app won't crash

    Actual behavior

    After zooming out on my react-leaflet map on my Ionic and Android app, the app crashes. I get the following errors each time when I check logcat on Android Studio:

    [ERROR:shared_context_state.cc(819)] SharedContextState context lost via Skia.
    [1203/030423.762223:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: Permission denied (13)
    

    This issue only seems to happen on my Pixel 7. On a Pixel 4a there are no problems.

    Steps to reproduce

    It's a pretty basic layout and works generally. Just doesn't work on Pixel 7. Looks like this

      <MapContainer center={[currLat, currLong]} zoom={13}>
    
    		<TileLayer
    		    attribution='&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
    		    url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
    		/>
    		
    		{mics.map(mic => (
    		    <Marker 
    			key={mic.id} 
    			position ={[
    			    mic.mic_lat, 
    			    mic.mic_long
    		    ]}
    			onClick = {() => {
    			    setActiveMic(mic);
    		    }}
    		    >
    		    <Popup position={[
    			    mic.mic_lat,
    			    mic.mic_long]}
    		    >
    				    <div>
    					    
    					    <Link to={`/MicProfile/${mic.id}/`}>{mic.mic_name}</Link><br />
    					    {mic.mic_showuptime}<br />
    					    {mic.mic_day}
    	    			    </div>
    
    		    </Popup>
    		    	    
    		    </Marker>
    		))}
    			
    	    </MapContainer>
    
    opened by filifunk 0
  • Tooltip flickering on markers list rerendering

    Tooltip flickering on markers list rerendering

    Bug report in v4

    • [x] All peer dependencies are installed: React, ReactDOM and Leaflet.
    • [x] Using the latest version of React and ReactDOM v18.
    • [x] Using the supported version of Leaflet (v1.8.0 minimum) and its corresponding CSS file is loaded.
    • [x] Using the latest v4 version of React-Leaflet.
    • [x] The issue has not already been reported.
    • [x] Make sure you have followed the quick start guide for Leaflet.
    • [x] Make sure you have fully read the documentation and that you understand the limitations.

    Expected behavior

    When markers are redendered with permanent tooltips I don't expect a flickering/flashing tooltip replaced for the new one.

    Actual behavior

    When markers are redendered the tooltips blink/flicker to be replaced by the new ones.

    Steps to reproduce

    make some state that rerenders the map with markers with tooltips inside.

    live example by selecting some marker which rerenders the markers again and tooltip blinks: https://pumptrackmapapp.azurewebsites.net/

    code: https://github.com/lluisd/pumptrack-map/blob/main/components/Map/Map.js

    opened by lluisd 0
Releases(v4.2.0)
Owner
Paul Le Cam
Full-stack JS/TS developer
Paul Le Cam
Vue 2 components for Leaflet maps

Vue2Leaflet Vue2Leaflet is a JavaScript library for the Vue framework that wraps Leaflet making it easy to create reactive maps. How to install npm in

Vue Leaflet 1.9k Dec 29, 2022
AngularJS directive to embed an interact with maps managed by Leaflet library

Angular Leaflet Why the fork? While we are grateful for all the original work at tombatossals/angular-leaflet-directive. We need to be able to operate

AngularUI 313 Nov 10, 2022
Mapbox JavaScript API, a Leaflet Plugin

mapbox.js A Mapbox plugin for Leaflet, a lightweight JavaScript library for traditional raster maps. For the state-of-the-art Mapbox vector maps libra

Mapbox 1.9k Dec 23, 2022
This is the leaflet plugin for GeoServer. Using this plugin user can have access to wms and wfs request easily.

Documentation leaflet-geoserver-request This is the plugin for Geoserver various kind of requests. Using this plugin, we can make WMS, WFS, getLegendG

Tek Kshetri 127 Dec 15, 2022
Add time dimension capabilities on a Leaflet map.

Leaflet TimeDimension Add time dimension capabilities on a Leaflet map. Examples and basic usage API L.Map L.TimeDimension L.TimeDimension.Layer L.Tim

SOCIB public code 379 Dec 23, 2022
This map is tracking the position of ISS(international space setallite) at every 1 second. I use Nasa's "where the iss" API and "Leaflet.js" for the map.

ISS-tracking-map About This map is tracking the position of ISS(international space setallite) at every 1 second. I use Nasa's "where the iss" API and

Waz.sheeran 2 Oct 25, 2021
Simple location picker on Leaflet map

Leaflet Location Picker Simple location picker with Leaflet map Usage: <label>Insert a Geo Location <input id="geoloc" type="text" value="" /> </lab

Stefano Cudini 37 Nov 17, 2022
:leaves: JavaScript library for mobile-friendly interactive maps

Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 39 KB of gzipped JS plus 4 KB of gzipp

Leaflet 36.5k Jan 1, 2023
An open-source JavaScript library for world-class 3D globes and maps :earth_americas:

CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics

Cesium 9.7k Dec 26, 2022
the easiest way to use Google Maps

Important If you're developer, I'm moving gmaps.js to NPM, you can give your opinion and check the migration progress in Issue #404 gmaps.js - A Javas

Gustavo Leon 7.1k Dec 28, 2022
Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.

Polymaps Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers. See http://polymaps.org for more details.

Urban Airship 1.6k Dec 23, 2022
UNMAINTAINED Open source JavaScript renderer for Kartograph SVG maps

This project is not maintained anymore. Here are a few reasons why I stopped working on kartograph.js: there's no need to support non-SVG browsers any

null 1.5k Dec 11, 2022
An open-source JavaScript library for world-class 3D globes and maps :earth_americas:

CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics

Cesium 9.7k Jan 3, 2023
the easiest way to use Google Maps

Important If you're developer, I'm moving gmaps.js to NPM, you can give your opinion and check the migration progress in Issue #404 gmaps.js - A Javas

Gustavo Leon 7.1k Apr 7, 2021
This is a collection of over two hundred code samples an growing for the Bing Maps V8 web control.

Bing Maps V8 Code Samples This is a collection of over a hundred code samples for the Bing Maps V8 web control. These samples have been collected from

Microsoft 130 Dec 8, 2022
This project contains the TypeScript definitions for the Bing Maps V8 Web Control.

Bing Maps V8 TypeScript Definitions These are the official TypeScript definitions for the Bing Maps V8 Web Control. These can be used to provide intel

Microsoft 35 Nov 23, 2022
Converts geojson to svg string given svg viewport size and maps extent.

geojson2svg Converts geojson to svg string given svg viewport size and maps extent. Check world map, SVG scaled map and color coded map examples to de

Gagan Bansal 163 Dec 17, 2022
Downloads satellite images from Google Maps, only slightly illegal.

Google Maps Satellite Downloader This is a script to download satellite images from Google Maps. The below mentioned optimization system requires that

null 5 Oct 31, 2022
A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.

Get Donate FIRO aEyKPU7mwWBYRFGoLiUGeQQybyzD8jzsS8 BTC: 3JZWooswwmmqQKw5iW6AYFfK5gcWTrvueE ETH: 0x90049dc59365dF683451319Aa4632aC61193dFA7 About A web

Simon Brazell 1.6k Dec 29, 2022