ckanext-geoview icon indicating copy to clipboard operation
ckanext-geoview copied to clipboard

Auto-zoom to visible scale range of WMS layer

Open gjlawran opened this issue 9 years ago • 1 comments

As a viewer using GeoView to preview a WMS layer I would like the map to automatically zoom to a scale range so that the WMS layer is visible when the resource preview map is presented.

For example, this resource preview requires the viewer to zoom in until the WMS reaches the draw threshold, where as this resource preview presents the WMS layers at the default small scale used for the map (taken from the layer extent).

The WMS GetCapabilities response may provide MinScaleDenominator and MaxScaleDenominator parameters which specify the draw thresholds for the layer. It is proposed that the GeoView use these parameters if present to ensure the map zooms to a visible scale range for preview.

  • When GetCapabilities returns both a MinScaleDenominator and a MaxScaleDenominator -> select the zoom so that the scale is halfway between.
  • When GetCapabilities presents only the MaxScaleDenominator -> select a scale that is 80% of the MaxScaleDenominator.
  • When only the MinScaleDenominator is present select a scale that is 120% of the MinScaleDenominator

gjlawran avatar Dec 22 '15 17:12 gjlawran

Internal reference - https://proj.data.gov.bc.ca/jira/browse/BCDC-756

hleckenb avatar May 30 '18 23:05 hleckenb