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

Changing Icon Titles #404

Closed
slauyama opened this issue Oct 10, 2014 · 1 comment
Closed

Changing Icon Titles #404

slauyama opened this issue Oct 10, 2014 · 1 comment

Comments

@slauyama
Copy link

Hi

I made a custom icon function that would display different text based on a dropdown value. The problem is that once an icon was created it would not show new text when the dropdown value changed. So once I was in a certain view the icon would be set and it would not update.

I ended up going through the markercluster code and got it to work by commenting out "this._iconNeedsUpdate = false" in the createIcon function

createIcon: function() {
            if (this._iconNeedsUpdate) {
                this._iconObj = this._group.options.iconCreateFunction(this);
                // this._iconNeedsUpdate = false;
            }
            return this._iconObj.createIcon();
        },

This works fine for me but I thought it might be nice to have a property that you pass into MarkerCluster that would allow for always updating. Or maybe adding a function that updates all the icons when needed?

@ghybs
Copy link
Contributor

ghybs commented Oct 9, 2015

Hi,

Old issue, but I think is also in the use case of PR #564.

@danzel danzel closed this as completed Oct 13, 2015
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

3 participants