Ticket #3024 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

New restrictedMinZoom property, like restrictedExtent

Reported by: ahocevar Owned by: euzuro
Priority: minor Milestone: 2.11 Release
Component: Layer Version: SVN
Keywords: Cc:
State: Complete

Description

The existing minZoomLevel property on Layer.FixedZoomLevels is a nice way to limit the used resolutions of layers provided by third-party apis, but it changes the numbering of zoom levels. The suggested restricedMinZoom property works similar to restricedExtent - it retains the zoom level numbering, but restricts the layer from being used at low zoom levels. This is especially useful when a map is configured with allOverlays: true.

Attachments

openlayers-3024.diff Download (5.8 KB) - added by ahocevar 2 years ago.

Change History

Changed 2 years ago by ahocevar

  • version changed from 2.10 to SVN
  • summary changed from New restrictedMinZoom property, like restricedExtent to New restrictedMinZoom property, like restrictedExtent

Patch with tests. Tests pass in Safari5. Thanks for any review.

Changed 2 years ago by ahocevar

  • owner set to euzuro
  • component changed from Map to Layer

Changed 2 years ago by ahocevar

Changed 2 years ago by bartvde

  • state changed from Review to Commit

ahocevar: this looks good to go, I only found one error in a testcase:

      //custom minZoomLevel on baseLayer
        map.baseLayer.minZoomLevel = 1;

should be restrictedMinZoom instead of minZoomLevel or not?

Respective tests also pass on FF 3.6 and IE8 btw.

Changed 2 years ago by ahocevar

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

Thanks for the review @bartvde. This was a typo indeed. Committing fixed version.

In w/ r11058

Note: See TracTickets for help on using tickets.