Ticket #3649 (closed bug: duplicate)

Opened 14 months ago

Last modified 14 months ago

Vector layers sometimes offset after map resize and map drag

Reported by: apexer Owned by:
Priority: major Milestone:
Component: general Version: 2.11
Keywords: Cc:
State:

Description

Steps to reproduce. 1. Place the map in a container which can be resized, such as a jquery-ui-layout panel. 2. Put a vector layer on the map. 3. Resize map 4. Click and drag map to move it. Notice the map jump as you start dragging (100% reproducible). 5. Sometimes the vector layer is still stuck in the position where the map "jumped" from. Leaving an offset which is stuck after zooming and panning. 6. Rezible the map a couple of times and the offset will fix itself.

Tested with Google Chrome 18

Change History

Changed 14 months ago by crschmidt

Any time the map size changes, the application may need to call map.updateSize(). This resets the maps view of where it is on the page, and should help this situation.

Changed 14 months ago by apexer

I've been experimenting with this and trying to find work arounds. map.updateSize() is being called but this doesn't seem to help the behaviour.

I've tried to remove and add the vector layer again, call redraw on it, recentering the map after a resize, etc.. None of this affects the behaviour once it's snapped out of place. As a side note, I have one layer with the old markers, and this never gets offset.

In firefox there is no problem.

Changed 14 months ago by erilem

  • status changed from new to closed
  • resolution set to duplicate

I think this issue is already tracked by  https://github.com/openlayers/openlayers/issues/392.

Note: See TracTickets for help on using tickets.