OpenLayers OpenLayers

Ticket #1451 (closed bug: fixed)

Opened 6 months ago

Last modified 5 months ago

ScaleLine doesn't change from out to in units if map units is not 'dd'

Reported by: pspencer Assigned to: tschaub
Priority: minor Milestone: 2.6 Release
Component: Control.ScaleLine Version: SVN
Keywords: Cc:
State: Complete

Description

The ScaleLine control includes a test to see if it should use larger or smaller units based on the desired maximum size of the control. The test uses the map resolution and does not accommodate map units other than 'dd'. The attached patch changes the code around slightly to include the inches per unit of the map units in the test factor and changes the numeric value of the test to something that appears to work for both 'dd' (using default resolutions for dd) and 'm' (using google resolutions).

Attachments

ScaleLine.patch (1.3 kB) - added by pspencer on 03/18/08 21:39:54.
patch ScaleLine to accommodate different map units.

Change History

03/18/08 21:39:54 changed by pspencer

  • attachment ScaleLine.patch added.

patch ScaleLine to accommodate different map units.

03/19/08 16:21:51 changed by crschmidt

  • state changed from Review to Commit.

Looks good, thanks Pual, Please commit.

03/20/08 12:49:24 changed by tschaub

Tests are failing in IE (without this: #1456).

03/20/08 14:16:49 changed by pspencer

Checking tests

03/20/08 14:18:23 changed by tschaub

For clarification, the test failures happen without this patch. I just thought as long as someone was running tests for the ScaleLine on IE...

03/20/08 17:28:29 changed by pspencer

I've been messing around with the tests a bit but I really need to set up something where I can compare the decision point between both 'dd' and 'm' map units and see if it the current value (100000) is actually the right number, and then the tests can be adjusted appropriately.

03/24/08 09:19:00 changed by pspencer

Tim, I've changed test_ScaleLine to test if maxWidth is respected at all zoom levels in a couple of different scenarios. Can you confirm that this is a suitable test?

03/26/08 16:37:30 changed by crschmidt

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

This appears to already be in trunk.