OpenLayers OpenLayers

Ticket #1457 (closed bug: invalid)

Opened 9 months ago

Last modified 8 months ago

No image is displayed when switching base layer

Reported by: openlayers Assigned to: crschmidt
Priority: minor Milestone: 2.6 Release
Component: Layer.FixedZoomLevels Version: SVN
Keywords: Cc: abejenaru@gmail.com
State: Complete

Description

Check the Spherical Mercator example and try chosing a different base layer. Although the image tiles seem to be loading, they are not displayed.

SVN: 6569

Attachments

fixed.patch (0.6 kB) - added by crschmidt on 03/21/08 10:05:51.
1457.patch (1.9 kB) - added by crschmidt on 03/21/08 12:13:39.
1457.2.patch (1.9 kB) - added by crschmidt on 03/21/08 12:59:06.

Change History

03/21/08 07:49:24 changed by bartvde

This is because the Google Layer does not have a minResolution and maxResolution, they are both null, so the calculateInRange won't work.

03/21/08 09:21:07 changed by crschmidt

Is this new? I don't remember anything changing here recently... Perhaps this is the result of my recent display() changes, I suppose?

03/21/08 09:40:47 changed by crschmidt

  • owner set to crschmidt.
  • status changed from new to assigned.

I've confirmed this is due to my recent layer changes. I think that the fact that the fixedzoomlevels subclasses don't have a min/max resolution set (and therefore no valid calculateInRange()) is a bug we should fix, rather than reverting my fix and changing it some other way.

I'll own this one, and fix it soon.

03/21/08 10:05:51 changed by crschmidt

  • attachment fixed.patch added.

03/21/08 10:06:17 changed by crschmidt

Patch attached. Seems to fix the problem for me. Anyone else want to try it anad confirm that it works for their application?

03/21/08 11:50:11 changed by crschmidt

  • milestone set to 2.6 Release.

Serious regression. Moving to 2.6.

03/21/08 12:13:39 changed by crschmidt

  • attachment 1457.patch added.

03/21/08 12:14:49 changed by crschmidt

  • state set to Review.

1457.patch adds a test. This test:

  • Succeeds before change to Layer.js
  • Fails on trunk
  • Succeeds with patch.

This is a test of functionality, rather than a unit test: This is okay with me, but I can write more tests for calculateInRange if people care.

WIth test, marking for Review.

03/21/08 12:59:06 changed by crschmidt

  • attachment 1457.2.patch added.

03/21/08 12:59:38 changed by crschmidt

Move the change inside the 'if' loop: if this.RESOLUTIONS == null, then we would have gotten an error. So, fix that.

03/21/08 13:09:49 changed by tschaub

  • state changed from Review to Commit.
  • component changed from general to Layer.FixedZoomLevels.

looks good

03/21/08 13:31:58 changed by crschmidt

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

(In [6572]) FixedZoomLevels subclassese don't propertly set min/max resolution, so calculateInRange always returns false, so the layers can never be displayed (due to recent code): Fix calculateInRange by setting min/max res. r=tschaub, (Closes #1457)

03/25/08 16:39:22 changed by openlayers

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

Still not OK.

Check the VE example: the base layer sets "minZoomLevel: 4, maxZoomLevel: 6", but instead of displaying a 3 unit zoom scale, it shows a 14 units bar (from minZoomLevel 4 to MAX_ZOOM_LEVEL 17).

Actually, I think that the MAX_ZOOM_LEVEL should be 16 for VirtualEarth, as there are only 16 entries in the RESOLUTIONS array; furthermore, after FixedZoomLevels::initResolutions() minResolution is undefined, as being RESOLUTIONS[17].

03/25/08 16:43:30 changed by crschmidt

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

This is a totally different issue, unrelated to this ticket.

It has also been the case since 2.2: http://dev.openlayers.org/releases/OpenLayers-2.2/examples/ve.html

Please create a new ticket for that issue.