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

ClassName className undefined for some child in iconCreateFunction #73

Open
NicolasGuruphat opened this issue Feb 17, 2023 · 0 comments

Comments

@NicolasGuruphat
Copy link

NicolasGuruphat commented Feb 17, 2023

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)

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