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

Avoid modifying map.logos_ with each frame #2875

Merged
merged 1 commit into from
Oct 26, 2014
Merged

Avoid modifying map.logos_ with each frame #2875

merged 1 commit into from
Oct 26, 2014

Conversation

tschaub
Copy link
Member

@tschaub tschaub commented Oct 26, 2014

Currently, the map.logos_ object is assigned to the frame state. Layer renderers then modify this (adding logos) when renderer.updateLogos() is called. This means logos are "append only" - if you remove a layer, its source's logo will not be removed.

This can be reproduced by opening the MapQuest example and running the following:

map.getLayers().removeAt(0)

Though it is hard to see (because the logos also become tiny), the logo is still in the DOM.

orphan

@elemoine
Copy link
Member

Looks good.

tschaub added a commit that referenced this pull request Oct 26, 2014
Avoid modifying `map.logos_` with each frame.
@tschaub tschaub merged commit aa6a5d5 into openlayers:master Oct 26, 2014
@tschaub tschaub deleted the orphan-logos branch October 26, 2014 19:11
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

Successfully merging this pull request may close these issues.

None yet

2 participants