smas1 / geoext-viewer

Automatically exported from code.google.com/p/geoext-viewer
GNU General Public License v3.0
0 stars 0 forks source link

Enable zoom to extent in Layer Context Menu for Layers with maxExtent configured #328

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The LayerNode context menu item, Heron.widgets.LayerNodeMenuItem.ZoomExtent is 
currently
only enabled for Vector Layers that contain feature data.  For Vector Layers 
the extent
is the data extent. 

For other Layers, specifically WMS/raster Layers, extent-zooming should also be
allowed when that Layer has the  'maxExtent' Layer property explicitly set. 
This should also take precedence 
when Vector Layers have both data and maxExtent though those cases will be 
rare. 

In the longer term 'dataExtent' should come from a Layer capabilities doc...

Original issue reported on code.google.com by jus...@gmail.com on 7 Jan 2014 at 3:54

GoogleCodeExporter commented 9 years ago
Layers with maxExtent configured will now also have 'zoom to layer extent' 
context menu enabled.
Example: see  http://lib.heron-mc.org/heron/latest/examples/defaultnl
(try the Overlay Layer 'hockeyclubs').

Original comment by jus...@gmail.com on 7 Jan 2014 at 4:00

GoogleCodeExporter commented 9 years ago
Why not use the bounding box declared in the WMS GetCapabilities?
In WMS 1.3.0:
<BoundingBox CRS="EPSG:27700" minx="267939.15" miny="362539.47" maxx="284374.4" 
maxy="382957.22"/>

WMS 1.1.1:
        <BoundingBox SRS="EPSG:27700" minx="384626.14592954854" miny="209442.60993204755" maxx="476843.5670624626" maxy="330579.46647809795"/>

More dev effort, but easier on the implementer. Just a thought. New ticket?

Original comment by jonathan...@warwickshire.gov.uk on 7 Jan 2014 at 4:55

GoogleCodeExporter commented 9 years ago
Theoretically that is the cleanest solution, bit harder to implement. In 
practice may lead to various issues: not all WMS-es return compliant documents, 
some documents may be huge (hundreds of layers), network/parsing overheads, so 
we may need to bundle capabilities requests for multiple Layers from the same 
WMS etc.

But also for other meta-info, getting the capabilities is worthwhile. For now 
you may want to open a new issue.

Original comment by jus...@gmail.com on 7 Jan 2014 at 5:31

GoogleCodeExporter commented 9 years ago
I didn't think it would be easy, just wanted to raise it. :-) Will open an 
issue. Thanks.

Original comment by jonathan...@warwickshire.gov.uk on 7 Jan 2014 at 5:36