Leaflet: Leaflet 1.9 breaks Leaflet.heat
Checklist
- I’ve looked at the documentation to make sure the behavior isn’t documented and expected.
- I’m sure this is an issue with Leaflet, not with my app or other dependencies (Angular, Cordova, React, etc.).
- I’ve searched through the current issues to make sure this hasn’t been reported yet.
- I agree to follow the Code of Conduct that this project adheres to.
Steps to reproduce
First of all, thanks for your work!
The steps to reproduce the issue is just updating leaflet to 1.9 and use the leaflet.heat package. (https://github.com/Leaflet/Leaflet.heat) I also use the @types/leaflet and @types/leaflet-heat packages.
Expected behavior
This worked before 1.9.0:
import * as L from 'leaflet';
import 'leaflet.heat';
....
const heatmapLayer = L.heatLayer(data, { radius: 15, max: 10, minOpacity: 0.75 });
Current behavior
The app breaks and produces the following error:
export 'heatLayer' (imported as 'L') was not found in 'leaflet' (possible exports: Bounds, Browser, CRS, Canvas, Circle, CircleMarker, Class, Control, DivIcon, DivOverlay, DomEvent, DomUtil, Draggable, Evented, FeatureGroup, GeoJSON, GridLayer, Handler, Icon, ImageOverlay, LatLng, LatLngBounds, Layer, LayerGroup, LineUtil, Map, Marker, Mixin, Path, Point, PolyUtil, Polygon, Polyline, Popup, PosAnimation, Projection, Rectangle, Renderer, SVG, SVGOverlay, TileLayer, Tooltip, Transformation, Util, VideoOverlay, bind, bounds, canvas, circle, circleMarker, control, default, divIcon, extend, featureGroup, geoJSON, geoJson, gridLayer, icon, imageOverlay, latLng, latLngBounds, layerGroup, map, marker, noConflict, point, polygon, polyline, popup, rectangle, setOptions, stamp, svg, svgOverlay, tileLayer, tooltip, transformation, version, videoOverlay)
Minimal example reproducing the issue
No response
Environment
- Leaflet version: 1.9.0
- Browser (with version): All
- OS/Platform (with version): All
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 25 (10 by maintainers)
Commits related to this issue
- Address https://github.com/Leaflet/Leaflet/issues/8451 — committed to unageek/graphest by unageek 2 years ago
We could revert this work in a patch release and then re-introduce it in 2.0. It looks like this is creating too much fallout.
v1.9.1 released.
Yeah, I’d like to do it ASAP. I don’t have time to get to it today, so if someone wants to go ahead now feel free. Just make sure all the critical stuff is cherry-picked on
v1
(which I think I already did).@cyrilirudayaraj we’re bundling multiple issues that need a resolution (see the milestone).
@jonkoops @mourner what is the plan now? What should we do? I think it is not ok, to make that big breaking change in 1.9
Yes I think that would be good. But if you guys think you find a solution in the next hours, it is also ok for me to wait. I need to go now, but I think you can handle this without me 😄
https://github.com/search?q="import+*+as+L+from+'leaflet'%3B"&type=code
“import * as L from ‘leaflet’;” --> 12,945 code results 😶
Should we do a quick v1.9.1 with the
listens
fix before we decide on this one, and do a v1.9.2 later if necessary? Or should we wait?