Ticket #1199 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

if scales is set on the map, you cannot use minScale and maxScale on the layer

Reported by: bartvde Owned by: pgiraud
Priority: critical Milestone: 2.7 Release
Component: Layer Version: SVN
Keywords: Cc:
State: Complete

Description

The code in initResolutions looks if the map object has a scales array. If this is the case it will take over the scales array. There is currently no way to override this, since passing in a null or empty scales array to the layer won't work.

Since the application of minScale and maxScale only takes place if scales is null, that piece of code will never be applied to the layer.

Chris Schmidt noted on the users list that he thinks this is a bug, but he is unsure on how to fix this.

Attachments

patch-1199-r5359-A0.diff Download (1.0 KB) - added by elemoine 5 years ago.
patch-1199-r5359-A1.diff Download (1.0 KB) - added by elemoine 5 years ago.
typo in previous patch
patch-1199-r7462-B0.diff Download (0.9 KB) - added by pgiraud 5 years ago.

Change History

Changed 5 years ago by bartvde

  • type changed from feature to bug

Changed 5 years ago by elemoine

I guess the same issue applies for minResolution/maxResolution/resolutions.

Changed 5 years ago by elemoine

Changed 5 years ago by elemoine

Check attached patch. Absolutely untested.

Changed 5 years ago by elemoine

typo in previous patch

Changed 5 years ago by elemoine

  • state set to Review
  • version changed from 2.5 to SVN
  • milestone set to 2.6 Release

Changed 5 years ago by crschmidt

  • state changed from Review to Commit

This looks good to me. Please commit.

Changed 5 years ago by elemoine

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

(In [5755]) If scales is set on the map, you cannot use minScale and maxScale on the layer. r=crschmidt. (closes #1199)

Changed 5 years ago by pgiraud

  • status changed from closed to reopened
  • state Complete deleted
  • resolution fixed deleted

This patch doesn't look entirely good to me. What if we don't want to set both minScale and maxScale but only one of those two properties ?

Changed 5 years ago by pgiraud

Changed 5 years ago by pgiraud

  • milestone changed from 2.6 Release to 2.7 Release

Changed 5 years ago by pgiraud

My patch doesn't work if we aren't in default projection.

Changed 5 years ago by crschmidt

  • priority changed from minor to critical
  • status changed from reopened to new

Changed 5 years ago by euzuro

  • status changed from new to assigned

Changed 5 years ago by euzuro

  • owner changed from euzuro to pgiraud
  • status changed from assigned to new
  • state set to Commit

we like this patch, it passes on all tests (safari, ie7, ff2)

please commit.

Changed 5 years ago by elemoine

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

(In [7688]) if scales is set on the map, you cannot use minScale and maxScale on the layer, p=pgiraud, r=me,euzuro (closes #1199)

Note: See TracTickets for help on using tickets.