Skip to content

Adding markers between calls to setView breaks when animation enabled. #2236

@emartinez-usgs

Description

@emartinez-usgs

The map locks up and becomes unusable if you set an initial center and zoom (via constructor), or later set the view (via setView), then add a marker to the map, then set the view again (another call to setView). Additionally, the final call to setView does not take effect.

Tested against v0.7 and current master (daf7345).
Example: http://jsfiddle.net/e5YZ7/

Some Notes:

  • I couldn't write a unit test to reproduce this because it seems if you document.createElement('div') the map container, then this works as expected, but if you pull a container out of an existing DOM then the bug reproduces.
  • This is not an issue if map.options.markerZoomAnimation === false
  • This is not an issue if {reset: true} is passed to setView calls.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions