-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix toLatLngBounds was not found in 'leaflet' #1343
Conversation
export 'toLatLngBounds' (imported as 'latLngBounds') was not found in 'leaflet'
Thank you for the PR!. This is a potential fix for #1342. We'll test this soon. |
waiting eagerly this fix |
Hi, we are hoping that the fixes happening in leaflet (Leaflet/Leaflet#8451 / Leaflet/Leaflet#8493) will resolve this without this PR being required. If the leaflet 1.9 patch does not resolve it, we will look more into this solution in this PR. Thanks for your patience! |
Hey! What about compatibility with older versions of Leaflet? |
@gavinr I saw Leaflet released |
Leaflet released v1.9.2 a few hours ago: https://github.com/Leaflet/Leaflet/releases/tag/v1.9.2 And I have tested that using 1.9.2 (instead of 1.9.0 or 1.9.1) fixes the issue #1342, so I think the solution is for anyone who wants to use leaflet v1.9 to use >=1.9.2 .... and this PR can be closed without merging. I will close this soon unless I hear any major objections. Thanks! |
I am assuming this is resolved if using leaflet v1.9.2 (#1342 (comment)). If not, please comment or open a new issue. Thank you! |
This still seems to be broken. Here is a simple reproduction using jsDelivr’s +esm service: import("https://cdn.jsdelivr.net/npm/esri-leaflet/+esm") This generates an error: SyntaxError: The requested module '/npm/[email protected]/+esm' does not provide an export named 'toLatLngBounds' |
@mbostock thanks for digging up this issue to report this item. I did a bit of research here: I do not get this error when installing via NPM and using the ES modules that way, for example here: https://github.com/gavinr-maps/esri-leaflet-react-demo. Is that the same for you? So then the issue is when using ES modules via
So I do think this is a slightly different (but similar) issue than the original issue here... It would probably be good to open a new issue, focusing on the error when using ESM url CDNs. |
export 'toLatLngBounds' (imported as 'latLngBounds') was not found in 'leaflet'