vue2-leaflet-markercluster
vue2-leaflet-markercluster copied to clipboard
ClassName className undefined for some child in iconCreateFunction
Hi, I have some issue with the iconCreateFunction option Here is a part of my tempate :
<v-marker-cluster :options="{ iconCreateFunction: iconCreateClsPrg}">
<l-marker ....>
<l-icon :class-name="programme.display ? 'custom-marker notDisplay' : 'custom-marker display"">
And here is a part of the iconCreateClsPrg method :
iconCreateClsPrg (marker_cluster) {
const childs = marker_cluster.getAllChildMarkers();
childs.forEach(child => {
const cssCluster = child.options.icon.options.className;
if (cssCluster && cssCluster.includes(this.css_marker_selected_simple)) {
nbSelected++;
}
}
...
}
My problem is that sometimes my cssCluster const is undefined for no reason. It's not a regular behavior and it happens only at some zoom levels (which are not always the same)