Ticket #3219 (new bug)

Opened 2 years ago

Last modified 2 years ago

PanZoomBar tries to zoom outside the valid zoom range

Reported by: saturka Owned by: crschmidt
Priority: minor Milestone: 2.13 Release
Component: Control.PanZoomBar Version: 2.10
Keywords: Cc:
State: Review

Description

When you tend to drag the bar of the PanZoomBar control too high (north off the control) or low (south off the widget), the control tends to do zoom into nonsense values. It is because the "zoomBarUp" method of the control does not check whether the "zoomLevel" computed value is inside the valid range of the current map zooms.

Play with any map with the PanZoomBar, like  http://dev.openlayers.org/releases/OpenLayers-2.10/examples/zoomify.html  http://dev.openlayers.org/releases/OpenLayers-2.10/examples/fractional-zoom.html

Some info at the list:  http://lists.osgeo.org/pipermail/openlayers-dev/2011-March/007318.html

Attachments

PanZoomBar.js.patch Download (0.7 KB) - added by saturka 2 years ago.
Zooming via dragging the bar of PanZoomBar shall not go outside map zoom interval

Change History

Changed 2 years ago by tschaub

  • state set to Awaiting User Feedback

The examples you link to are from the 2.10 release. Just for clarification, is the issue you are describing present in the 2.10 release?

 http://dev.openlayers.org/releases/OpenLayers-2.10/examples/fractional-zoom.html

If so, do you see the same behavior from the trunk?

http://openlayers.org/dev/examples/fractional-zoom.html

(If the behavior is the same, this is not a regression.)

Please describe more specifically the workflow to reproduce the issue. I am seeing an issue with the PanZoomBar, but I don't immediately see how to get it to zoom to -1 or 22 as you describe in your email.

Thanks for any additional detail.

Changed 2 years ago by tschaub

Without being sure how to reproduce the issue described here, I've opened up ticket #3220 to describe the issue I see with the PanZoomBar. I'm assuming this is a separate issue.

Changed 2 years ago by saturka

Yes, it is at the 2.10 release, and the same with the  http://www.openlayers.org/api/OpenLayers.js file, tested under Linux (Firefox, Chrome).

* Look at a page with PanZoomBar control (e.g.  http://dev.openlayers.org/releases/OpenLayers-2.10/examples/zoomify.html ).

* Drag the horizontal bar (of the PanZoomBar) handle along the vertical zoom line.

* Move your mouse out of the vertical line (too up or down) while still having the mouse button pressed.

* Now for many situations, the zoom does not changes correctly.

* When you play with the zoom bar again, it behaves chaotically then.

* It goes back to the good behavior when you just click on the vertical part of the PanZoomBar.

Changed 2 years ago by saturka

Zooming via dragging the bar of PanZoomBar shall not go outside map zoom interval

Changed 2 years ago by saturka

  • state changed from Awaiting User Feedback to Review

The added patch is for the current dev (i.e. pre-2.11) version.

Note: See TracTickets for help on using tickets.