Ticket #2901 (closed bug: wontfix)
MapMarkers positioned incorrectly when browser resized on VirtualEarth Layer
| Reported by: | JeremyRyan | Owned by: | ahocevar |
|---|---|---|---|
| Priority: | major | Milestone: | 2.12 Release |
| Component: | Layer.VirtualEarth | Version: | 2.10 |
| Keywords: | VirtualEarth, Bing, Marker, Resize Browser, | Cc: | andy.kane@… |
| State: |
Description
Using one of the OpenLayers sample pages for VirtualEarth, I added a map marker to the map. When the browser is resized, the marker moves correctly to being with, but soon moves to an incorrect position. The marker offset by which the position is incorrect seems to be determined by how far the browser window has been resized by.
During some debugging of the VirtualEarth layer, I found that the bounds within the VEMap object where wrong, which in turn returned incorrect pixel locations for the marker within the getMapObjectPixelFromMapObjectLonLat function. When the marker was resized correctly, the bounds within VEMap where correct and the correct pixel location was returned.
I have enclosed sample code which adds a map marker on a VirtualEarth map. I have also enclosed screen shots of the bug with ResizedMapWindow0.gif as the starting image and ResizedMapWindow4.gif as the ending image.
Platform: Windows XP (32bit).

