OpenLayers OpenLayers

Ticket #334 (closed feature: fixed)

Opened 2 years ago

Last modified 1 year ago

Layer.js change breaks commercial layers

Reported by: crschmidt Assigned to: crschmidt
Priority: blocker Milestone: 2.2 Release
Component: general Version: SVN
Keywords: Cc:
State:

Description

Currently none of the commercial layers work due to moving the 'copy properties onto the layer object' stage from setMap to initResolutions. Do something about that.

Attachments

fixedzoom.patch (0.9 kB) - added by crschmidt on 10/08/06 12:01:51.
copymaxextent.2.patch (1.3 kB) - added by euzuro on 10/09/06 20:29:21.
no need to copy max/minExtent, projection, or units -- none of these is modified by initResolutions. Instead, copy them over in setMap
copymaxextent.patch (10.1 kB) - added by euzuro on 10/10/06 12:01:34.
ok. now i think we have a finally solution. pulled out unnecessary copies from general layer.js initResolutions() and redid the fixedzoomlevels initResolutions() to correctly calculate min/num,max zoomlevels stuff. changed goog/yahoo/ve layer from having present min/max to having *constant* min/max. these constant values get taken into account in the calculations. added tests.

Change History

10/08/06 12:01:51 changed by crschmidt

  • attachment fixedzoom.patch added.

10/08/06 12:03:08 changed by crschmidt

  • keywords set to +review.
  • owner changed from euzuro to crschmidt.
  • status changed from new to assigned.

FixedZoomLevels clobbers initResolutions in the Layer.js. We used to set the properties in setMap, which isn't clobbered, until r1662, but we moved it into initResolutions. That's a fine choice, but we need to make sure that FixedZoomLevels layers still get most of their properties set by the map.

Erik, please review and commit.

10/09/06 18:44:22 changed by euzuro

  • status changed from assigned to closed.
  • resolution set to invalid.

so the reason commercial layers weren't working is actually due to a problem introduced with the fix for Scale dependent layer visibility ticket.

See #99 for new patch to fix this.

10/09/06 18:46:39 changed by euzuro

  • status changed from closed to reopened.
  • resolution deleted.

10/09/06 18:52:13 changed by euzuro

so actually there was one of those variables that we did want to bring over from the map to the layer: maxExtent.

In the case of a traditional layer maxExtent is sometimes used in the initialization of the resolutions array (when maxResolution is set to "auto"). FixedZoomLevel layers, however, have no need for maxExtent in order to initialize their resolutions.

Regardless of this fact, maxExtent *is* used for determining whether or not to draw tiles outside of the maxExtent, so not setting this poses a problem. Currently, you don't see this in the google layer because a maxExtent is set by default in its initialization(). VE, however, does not have such a default and we see a script error.

So: We'll bring it over!

See patch.

Please review

10/09/06 20:29:21 changed by euzuro

  • attachment copymaxextent.2.patch added.

no need to copy max/minExtent, projection, or units -- none of these is modified by initResolutions. Instead, copy them over in setMap

10/09/06 20:31:21 changed by euzuro

cr5 -- please review

10/09/06 20:36:51 changed by crschmidt

Patch looks good. Go ahead to commit.

10/10/06 12:01:34 changed by euzuro

  • attachment copymaxextent.patch added.

ok. now i think we have a finally solution. pulled out unnecessary copies from general layer.js initResolutions() and redid the fixedzoomlevels initResolutions() to correctly calculate min/num,max zoomlevels stuff. changed goog/yahoo/ve layer from having present min/max to having *constant* min/max. these constant values get taken into account in the calculations. added tests.

10/10/06 16:14:34 changed by crschmidt

Closed with r1723.

10/10/06 16:14:44 changed by crschmidt

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

07/05/07 17:00:49 changed by euzuro

  • keywords deleted.