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

TypeError: Z.markerClusterGroup is not a function #89

Open
Stan92 opened this issue Aug 11, 2024 · 0 comments
Open

TypeError: Z.markerClusterGroup is not a function #89

Stan92 opened this issue Aug 11, 2024 · 0 comments

Comments

@Stan92
Copy link

Stan92 commented Aug 11, 2024

Hi,
I m facing a strange bug.. it perfectly work in dev env but once I build the app I get an error

my packages

    "@bluehalo/ngx-leaflet": "^18.0.2",
    "@bluehalo/ngx-leaflet-markercluster": "^18.0.1",
   "leaflet": "^1.9.4",
   "leaflet.markercluster": "^1.5.3",

The error

chunk-BIIIJQ6J.js:7 ERROR 
TypeError: Z.markerClusterGroup is not a function
    at f.ngOnInit (chunk-XPW44FIX.js:1:34715)
    at Hg (chunk-BIIIJQ6J.js:7:20147)

This the part of the code that generates the error

        ngOnInit() {
            this.leafletDirective.init();
            let t = this.leafletDirective.getMap();
            **this.markerClusterGroup = Z.markerClusterGroup(this.markerClusterOptions),**
            this.markerClusterGroup.addTo(t),
            this.setData(this.markerData),
            this.markerClusterReady.emit(this.markerClusterGroup)
        }

  <div class="min-h-80"
       leaflet
       [leafletLayers]="layers"
       [leafletOptions]="options"
       (leafletMapReady)="onMapReady($event)"
       [leafletMarkerCluster]="markerClusterData"
       [leafletMarkerClusterOptions]="markerClusterOptions"
       (leafletMarkerClusterReady)="markerClusterReady($event)"></div>

I probably missed something.. but can't figure out.

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