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

Patch for L.Control#setPosition #657

Merged
merged 1 commit into from May 3, 2012
Merged

Conversation

ericmmartinez
Copy link
Contributor

Previous code resulted in errors.

First, by setting this.options.position before removing the control from the map, the map was looking in the wrong control container for the control to be removed.

Second, during the call to removeControl, this._map is unset so the subsequent call to addControl would always fail since this._map is undefined.

The proposed may not be perfect but it at least works.

mourner added a commit that referenced this pull request May 3, 2012
Patch for L.Control#setPosition
@mourner mourner merged commit 0bd0c1a into Leaflet:master May 3, 2012
@mourner
Copy link
Member

mourner commented May 3, 2012

Thanks!

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

3 participants