OpenLayers OpenLayers

Ticket #987 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

Markers stop at zoom level 16 over layers with higher numZoomLevels

Reported by: crschmidt Assigned to: crschmidt
Priority: critical Milestone: 2.7 Release
Component: Layer Version: 2.4
Keywords: Cc:
State: Complete

Description

Long standing bug is that markers over a commercial layer will turn off past the default zoom level of 16. Problem with calculateinrange and the setting of the minResolution on the layer.

Attachments

layer.patch (3.8 kB) - added by crschmidt on 08/02/08 12:23:34.
layer.2.patch (4.2 kB) - added by crschmidt on 08/02/08 12:29:14.
layer.3.patch (6.0 kB) - added by euzuro on 08/20/08 20:44:59.
update to already great patch -- just added some comments for extra clarity, double-return in function, long lines, etc.

Change History

09/19/07 18:22:11 changed by crschmidt

this is because properties are not pulled from the baselayer, they're pulled from the map. it's likely we want to have initResolutions set calculateInRange to always return true.

12/06/07 09:08:37 changed by crschmidt

I'm not actually sure my previous comment is true: we probably instead want to have overlays pull from the baselayer at instantiation, not from the map.

12/06/07 09:09:31 changed by crschmidt

  • summary changed from adding markers layer over VE -- markers stop at zoom level 16 to Markers stop at zoom level 16 over layers with higher numZoomLevels.

01/22/08 17:41:08 changed by crschmidt

  • state changed.
  • milestone changed from 2.6 Release to 2.7 Release.

Mass ticket move to 2.7 post dev meeting. If you are actively working on this task, please update this ticket with information and change the milestone to 2.6. At the time of the next IRC meeting (most likely 1-31-08), this will mean the ticket can *not* be brought back into 2.6 unless there is further feedback.

07/28/08 12:37:25 changed by crschmidt

  • owner changed from euzuro to crschmidt.
  • priority changed from minor to critical.
  • status changed from new to assigned.

08/02/08 11:56:25 changed by crschmidt

So, here's the plan:

  • Currently, overlays use calculateInRange always. When there are no range-related properties on the layer, this probably doesn't make sense.
  • We should add an option on the layer class that says 'use scale-based stuff'. If there are no scale-based options on the layer, we should set this to false by default (probably in initResolutions)
  • We should update calculateInRange to always return true unless this variable is set to say that scale-based ranges should be used.

08/02/08 12:23:34 changed by crschmidt

  • attachment layer.patch added.

08/02/08 12:29:05 changed by crschmidt

  • component changed from Layer.Markers to Layer.
  • Add alwaysInRange property, set in initResolutions
  • If none of the scale-related properties are set in initResolutions, then set alwaysInRange to true.
  • Adjust calculateInRange to return true always if alwaysInRange is true
  • Add tests.

To maintain old behavior, set:

OpenLayers.Layer.prototype.alwaysInRange = false;

08/02/08 12:29:14 changed by crschmidt

  • attachment layer.2.patch added.

08/02/08 12:29:28 changed by crschmidt

  • owner deleted.
  • status changed from assigned to new.
  • state set to Review.

08/03/08 11:02:05 changed by euzuro

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

08/20/08 20:44:59 changed by euzuro

  • attachment layer.3.patch added.

update to already great patch -- just added some comments for extra clarity, double-return in function, long lines, etc.

08/20/08 21:04:30 changed by euzuro

  • owner changed from euzuro to crschmidt.
  • status changed from assigned to new.
  • state changed from Review to Commit.

new patch added. all tests pass ff2, ie7. please give it your final thumbs up and put it in if you're down, cr5.

08/26/08 10:27:36 changed by crschmidt

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

(In [7863]) Update calculateInRange: Only turn layers off if they have some scale-related properties set directly in their creation options. By default, layers will be "always on", with an overridable "alwaysInRange" parameter.

To maintain the old behavior, set:

OpenLayers.Layer.prototype.alwaysInRange = false;

r=euzuro (Closes #987)