Open GoogleCodeExporter opened 9 years ago
Hi - you can make a layer not-queryable by simply not declaring the
featureInfoFormat for that layer I believe.
So:
//polygon
new OpenLayers.Layer.WMS(
"MasterMap - Traditional Style",
Heron.WCC.InternalUrls.geoserver_ows,
{layers: "OS_MasterMap_Group_Traditional_Style", transparent: true, format: 'image/png8'},
{singleTile: false, visibility: false, attribution: OS_attribution, maxResolution: this_scale(5000)}
),
rather than
//line
new OpenLayers.Layer.WMS(
"MasterMap - BoundaryLine",
Heron.WCC.InternalUrls.geoserver_ows,
{layers: "OS_MM_BOUNDARYLINE", transparent: true, format: 'image/png8', styles:'OSMM BoundaryLine - 75000 Threshold'},
{singleTile: true, visibility: false, attribution: OS_attribution, featureInfoFormat: 'application/vnd.ogc.gml', maxResolution: this_scale(75000)}
),
Does that do what you want?
Original comment by jonathan...@warwickshire.gov.uk
on 12 May 2014 at 12:37
Ah sorry, I don't don't know about that as I have no vector layers in my
projects.
Original comment by jonathan...@warwickshire.gov.uk
on 12 May 2014 at 2:19
Yes, that is right: Vector Layers are now always queried, although those
queries mainly will assemble vector objects already on the client. As GXP was
using a generic custom Layer parameter 'queryable: false|true', default true,
this is already supported within Heron for WMS Layers, but not yet Vector
Layers, but this is a small additional check.
But overall I can see the use of just having a small dedicated set (array) of
Layers that need to be queried with methods to alter that set dynamically. I
guess the array could contain Layer Names or Layer objects.
One question: is it interesting that Layers can be queried in those cases, even
if non-visible? This would allow a more, 'Google-style' basemap in which one
could click or hover without having to show all objects in the layer already.
Original comment by jus...@gmail.com
on 21 May 2014 at 6:43
In my case only those layers should be queried that are visible. That could
also be another option if someone wants to query all layers regardless of
visibility. For example queryOnlyVisibleLayers: true/false.
2014-05-21 8:43 GMT+02:00 <geoext-viewer@googlecode.com>:
Original comment by fegyi...@gmail.com
on 21 May 2014 at 6:50
You can set a layer to be "invisible" with an SLD while still being "visible"
within Heron/OpenLayers. This way it can be queried. I do this for a meta-data
layer in one of my apps.
Original comment by jonathan...@warwickshire.gov.uk
on 21 May 2014 at 9:25
Original issue reported on code.google.com by
fegyi...@gmail.com
on 10 May 2014 at 8:30