OpenLayers OpenLayers

Ticket #1288 (closed feature: fixed)

Opened 11 months ago

Last modified 10 months ago

give PanZoomBar a fractionalZoom property

Reported by: bartvde Assigned to:
Priority: minor Milestone: 2.6 Release
Component: Control.PanZoomBar Version: 2.5
Keywords: Cc: thijsbrentjens
State: Complete

Description

Since the map now allows for non-discrete zoomlevels (see ticket:1243), it makes sense to also have a ZoomBar that can slide to arbitrary zoomlevels. This can be added as a property named fractionalZoom to the PanZoomBar control.

This ticket depends on ticket:1243.

Attachments

ticket1288.patch (1.1 kB) - added by bartvde on 01/22/08 06:37:53.
fractional_panzoombar.patch (2.0 kB) - added by crschmidt on 02/09/08 09:28:13.
frac_bar.patch (2.7 kB) - added by crschmidt on 02/09/08 11:28:41.
frac.patch (2.7 kB) - added by tschaub on 02/15/08 18:27:06.
fractional zoom barring

Change History

01/22/08 06:37:53 changed by bartvde

  • attachment ticket1288.patch added.

01/22/08 06:39:28 changed by bartvde

Also see a comment at ticket:1243 :

http://trac.openlayers.org/ticket/1243#comment:10

Maybe the code used here can be simplified (just call zoomTo).

01/22/08 08:30:26 changed by bartvde

  • cc set to thijsbrentjens.

01/31/08 17:04:29 changed by bartvde

crschmidt>	bartvde: one comment on #1288. I think that we need to round up/down if you're trying to move a fractionally zoomed zoombar one more step
	<oltrac>	Ticket #1288: give PanZoomBar a fractionalZoom property, http://trac.openlayers.org/ticket/1288
	<crschmidt>	so if you're at 0.5 and you zoom out
	<crschmidt>	it should go to 0.0
	<crschmidt>	and if you're at 15.5 and you zoom in, it should go to 16

02/09/08 09:28:13 changed by crschmidt

  • attachment fractional_panzoombar.patch added.

02/09/08 09:29:18 changed by crschmidt

  • state set to Review.

02/09/08 10:41:45 changed by crschmidt

  • state changed from Review to Needs More Work.

Buggy when clicking directly on the panzoombar.

02/09/08 10:59:08 changed by crschmidt

  • state changed from Needs More Work to Review.

I think this patch fixes it.

02/09/08 11:20:15 changed by elemoine

I've played with the example and it works great on FF2/Linux.

If the pan zoom bar still works on other browsers and the unit tests pass you have my "Go ahead and commit this thing".

02/09/08 11:28:41 changed by crschmidt

  • attachment frac_bar.patch added.

02/15/08 18:27:06 changed by tschaub

  • attachment frac.patch added.

fractional zoom barring

02/15/08 18:28:33 changed by tschaub

  • state changed from Review to Commit.

Seems like the max should never be more than map.getNumZoomLevels() - 1, though I know this is dealt with elsewhere. Either way (my patch only subtracts one in two places), I think this is good to go.

02/20/08 18:44:34 changed by tschaub

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [6331]) Adding support for fractional zoom to the pan zoom bar. Setting map.fractionalZoom to true allows you to access a continuous range of resolutions with the pan zoom bar. r=crschmidt,me (closes #1288)

02/20/08 18:46:40 changed by tschaub

  • component changed from general to Control.PanZoomBar.

Another typo in the above patches was to check map.fractionalZoom instead of this.map.fractionalZoom. This didn't have any effect on the fractional zoom example because it uses a map named map. r6331 uses this.map.fractionalZoom.