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

Implement getIcon() for Markers #6457

Closed
OsamaShabrez opened this issue Jan 4, 2019 · 1 comment
Closed

Implement getIcon() for Markers #6457

OsamaShabrez opened this issue Jan 4, 2019 · 1 comment

Comments

@OsamaShabrez
Copy link
Contributor

I am trying to optimize my application to avoid unnecessary redraws. I always get a collection of markers from my database and then I have to do a comparison to see if I need an update.

It would be cool if we can have a getIcon / getIconUrl / getCustomIconUrl function which will return the URL to the marker image which can be then used to identify if a marker needs to be redrawn.

For instance, in my application, I have a different icon for currently selected marker but it appears there is no way I can check what is the current icon and then only update a single marker rather than removing all markers and recreating them from scratch.

@IvanSanchez
Copy link
Member

No need. Just read the value for myMarker.options.icon instead.

If you really need this, you're welcome to send a PR implementing a getIcon getter function which just returns this.options.icon.

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

2 participants