OpenLayers OpenLayers

Ticket #503 (closed bug: fixed)

Opened 2 years ago

Last modified 1 year ago

OpenLayers.Control.Scale doesn't seem to read correct scale below 1:500

Reported by: openlayers Assigned to:
Priority: minor Milestone: 2.4 Release
Component: general Version: 2.3 RC3
Keywords: Cc:
State:

Description

I am using the Control.Scale on a map in metres using a scales array of:

[10000,5000,2000,1000,500,250,100,50,20,10]

The Scale control doesn't show the correct scale after 1:500. It shows 1:300 (for 1:250), 1:100 (for 1:100), 1:100 (for 1:50), 1:0 (for 1:20) and 1:0 (for 1:10).

I am using openlayers for documenting archaeological excavations, therefore the centimetre accuracy is important for us.

Stuart Eve stuarteve@lparchaeology.com

Attachments

scale.patch (3.2 kB) - added by crschmidt on 02/18/07 08:25:10.
round differently, add tests

Change History

02/18/07 06:22:47 changed by openlayers

  • type changed from feature to bug.

02/18/07 08:19:06 changed by crschmidt

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

This patch changes the Scale control to round scales to integers, rather than to the nearest 100, when looking at scales less than 10k.

As part of practicing what I preach, this patch also includes tests for the scale control, which test this functionality.

02/18/07 08:25:10 changed by crschmidt

  • attachment scale.patch added.

round differently, add tests

02/19/07 17:42:45 changed by sderle

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

Looks good. Applied to trunk as r2244. Thanks, Chris.

07/05/07 17:06:52 changed by euzuro

  • keywords deleted.