[OpenLayers-Trac] Re: [OpenLayers] #3058: Use correct maxResolution for Web Mercator

OpenLayers trac-20090302 at openlayers.org
Mon Feb 14 05:52:05 EST 2011

#3058: Use correct maxResolution for Web Mercator
 Reporter:  ahocevar  |       Owner:                 
     Type:  feature   |      Status:  new            
 Priority:  minor     |   Milestone:  2.11 Release   
Component:  general   |     Version:  2.10           
 Keywords:            |       State:  Needs More Work

Comment(by ahocevar):

 Hm. This happens when running tests without clearing the cache first.
 There are 3 different reasons for failing tests:

  * Tests expecting {{{20037508.3392}}} as center lon ("edge of the world")
 should expect {{{20037508.34}}}. This is because of the definition of the
 map resolutions (see above). With this change, these tests pass.
  * The test that expects {{{-12210356.6442}}} should now expect {{{100 *
 map.getResolution() - 20037508.34}}}. Unfortunately the test still fails
 after this change.
 * The remaining failing tests fail because of values incorrect at a
 magnitude of {{{1e-8}}}.

 The interesting thing is: when setting
 {{{OpenLayers.Util.DEFAULT_PRECISION = 0;}}}, all tests pass. So I suspect
 that somewhere in the chain we should use {{{OpenLayers.Util.toFloat}}}
 where we currently don't.

 This needs further investigation.

Ticket URL: <http://trac.openlayers.org/ticket/3058#comment:3>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer

More information about the Trac mailing list