OpenLayers OpenLayers

Ticket #462 (closed feature: fixed)

Opened 2 years ago

Last modified 1 year ago

predefined scales seem to break the Layer.getZoomForExtent() method

Reported by: pgiraud Assigned to:
Priority: minor Milestone: 2.6 Release
Component: general Version:
Keywords: Cc:
State:

Description

When using predefined scales, the getZoomForExtent doesn't return the right zoom level because the resolution comparison in getZoomForResolution() doesn't return the good one either. My thought is that the idealResolution used should the Math.min and not the Math.max calculated resolution.

Attachments

getZoomForExtent.patch.txt (0.7 kB) - added by pgiraud on 01/05/07 06:05:37.
patch
getZoomForExtent.patch (0.7 kB) - added by pgiraud on 01/05/07 06:06:17.

Change History

01/05/07 06:05:37 changed by pgiraud

  • attachment getZoomForExtent.patch.txt added.

patch

01/05/07 06:06:17 changed by pgiraud

  • attachment getZoomForExtent.patch added.

03/09/07 17:17:32 changed by sderle

  • keywords set to review.
  • milestone set to 2.5 Release.

06/17/07 09:38:42 changed by crschmidt

  • keywords deleted.

Please provide a setup where this is broken. In general, we seek to find the zoom level which includes *all* of the extent: sometimes, this means we are farther out than we might be otherwise, but if someone draws a very tall box (say, around chile), you want to see all of chile, not just the width of it.

08/23/07 08:38:17 changed by crschmidt

  • milestone changed from 2.5 Release to 2.6 Release.

10/13/07 09:07:09 changed by crschmidt

  • status changed from new to closed.
  • resolution set to fixed.

We've changed this code around a fair amount in the meantime: Closing pending further comment from Pierre.