Ticket #1969 (closed bug: worksforme)
Draggable vector geometry breaks when near edge of map and map is zoomed in
| Reported by: | CharlesHarrison | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.8 Release |
| Component: | general | Version: | 2.7 |
| Keywords: | Cc: | ||
| State: |
Description
There was some further discussion about this in Ticket #1860 after that problem was fixed. Basically there are two symptoms, which may be of two underlying problems or just different symptoms of one underlying problem.
1) Zooming when a marker, consisting of a vector geometry/collection, is near the edge of the map breaks the marker.
This can be demoed here:
http://www.macfh.co.uk/Test/UKOrdnance_Survey_with_OpenLayers%20-%20Marker%20Bug.html
A fix for this zoom bug is to define a zoomend listener that removes and replaces the marker, as follows ...
"zoomend": UKOSZoomEnd
function UKOSZoomEnd( anEvent )
{
if( UKOSMarkerF != null )
{
UKOSVectorL.removeFeatures( [UKOSMarkerF] );
UKOSVectorL.addFeatures( [UKOSMarkerF] );
}
}
This listener is the only functional difference between the buggy and the following working demo ...
http://www.macfh.co.uk/Test/UKOrdnance_Survey_with_OpenLayers.html
2) At high zooms, graphics which are part of the marker disappear. This seems to be related to Ticket #1782, seems most prone to happen in Firefox 3, and can (sometimes) be demoed here ...
http://www.macfh.co.uk/Test/Google_with_OpenLayers.html
... or here ...
http://www.macfh.co.uk/JavaJive/AudioVisualTV/SatelliteTV/SatelliteCalculator.html
For the latter, choose, say, 'UK Placename' or 'World Placename' under 'Entry Method', type in 'London' or wherever, tab out of the entry box to set the value typed, then click each map button. Two maps will be drawn. Putting either or both to near maximum zoom may well lose the graphic in its marker.
I was hoping that Patch #1782 would fix both problems, but it doesn't. This is how the two bugs and that patch interact:
Without zoomend listener and without Patch 1782: 1 and 2
With listener and without Patch 1782: 2
Without listener and with Patch 1782: 1
With listener and with Patch 1782: Initially everthing looks alright, but if a situation is created where formerly 1 would have occurred, we now have 2 instead!
