Marker Cluster BUG

I am using an Appfarm map component in one view, and a coded component using Leaflet code to interact with a map in another view.

When navigating from the coded component view to the Appfarm map the site crashes and I get error:

Name
TypeError


Message
L.MarkerClusterGroup is not a constructor


Trace
TypeError: L.MarkerClusterGroup is not a constructor
    at L.markerClusterGroup

So I saw that we had Clustering enabled on the markers in the Appfarm map. When I disabled this the error was fixed. So, I assume there are some Appfarm bug. Just wanted to let you know.

1 Like

Hi,

I was unable to recreate the issue in our Dev Environment.
I have however registered a challenge on the issue. If you have anymore details, then please let us know :slightly_smiling_face:

Are you 100% sure that error is not thrown by the Leaflet code in your Coded Component. It seems like both your Coded Component and Appfarm uses Leaflet for maps.

// Erik

I am not using MarkerClusterGroup in my coded component. Here is the trace:

Trace
TypeError: L.MarkerClusterGroup is not a constructor
    at L.markerClusterGroup (https://leasi-dev.appfarm.app/assets/9232.7b2c83653f345e5300e3.js:735:42076)
    at new e (https://leasi-dev.appfarm.app/assets/6572.6863df59c749906ada4f.js:1:4456)
    at https://leasi-dev.appfarm.app/assets/6572.6863df59c749906ada4f.js:1:23080
    at Array.map (<anonymous>)
    at i.value (https://leasi-dev.appfarm.app/assets/6572.6863df59c749906ada4f.js:1:23055)
    at oY (https://leasi-dev.appfarm.app/assets/react.666f345cd1524f08d6ce.js:25:90561)
    at e (https://leasi-dev.appfarm.app/assets/react.666f345cd1524f08d6ce.js:25:111082)
    at https://leasi-dev.appfarm.app/assets/react.666f345cd1524f08d6ce.js:25:111093
    at uO (https://leasi-dev.appfarm.app/assets/react.666f345cd1524f08d6ce.js:25:111605)
    at uS (https://leasi-dev.appfarm.app/assets/react.666f345cd1524f08d6ce.js:25:94977)
    at x (https://leasi-dev.appfarm.app/assets/react.666f345cd1524f08d6ce.js:33:1364)
    at R (https://leasi-dev.appfarm.app/assets/react.666f345cd1524f08d6ce.js:33:1894)
    at https://cdnjs.cloudflare.com/ajax/libs/exceljs/4.4.0/exceljs.min.js:22:95701
    at d (https://cdnjs.cloudflare.com/ajax/libs/exceljs/4.4.0/exceljs.min.js:22:95816)
    at p (https://cdnjs.cloudflare.com/ajax/libs/exceljs/4.4.0/exceljs.min.js:22:95917)

Can I see from here where the issue is?

2 Likes