Skip to content
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

Update to Angular 19 : ERROR -> L is not defined and L2.markerClusterGroup is not a function #94

Open
RChrys opened this issue Jan 21, 2025 · 0 comments

Comments

@RChrys
Copy link

RChrys commented Jan 21, 2025

Image

I am encountering two errors when using the ngx-leaflet-markercluster package in my Angular application.

Error 1: Uncaught ReferenceError: L is not defined This error occurs in the global scripts file.

Error 2: TypeError: L2.markerClusterGroup is not a function This error is triggered during the ngOnInit lifecycle hook of LeafletMarkerClusterDirective.

Steps to Reproduce:

  • Set up the ngx-leaflet-markercluster package in an Angular project.
  • Use the LeafletMarkerClusterDirective in a component.
  • Run the application and observe the errors in the console.

Expected Behavior: The application should render the marker clusters without any errors.

Actual Behavior: The application throws the mentioned errors and the marker clusters do not function as expected.

Environment:

Angular Version: 19.0.6
ngx-leaflet-markercluster Version: 19.0.0
Leaflet Version: 1.9.4

If more information is needed, please let me know. Thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant