Skip to content

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

@RChrys

Description

@RChrys

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions