Hello OpenLayers Users,
I have seen the following thread which describes my case to a T.
http://osgeo-org.1803224.n2.nabble.com/OL-2-9-1-Restrict-WMSGetFeatureInfo-according-the-layers-td5460019.html
However, this thread is a little old. Is it true that there is no possible
solution or workaround for this situation to date? It is really confusing
for users to get feature info for layers which are not appearing on the map
at the time of the request.
To recap the issue:
I have layers that I set the minScale so that they are not visible at all
zoom levels. Even though these layers are not visible at these levels,
feature info is returned...
An example of such a layer:
var villages = new OpenLayers.Layer.WMS(
"Villages",
"http://localhost:8080/geoserver/gwc/service/wms",
{layers: 'cite:villages', transparent: true}, {layerId: 'Villages',
isBaseLayer: false, displayInLayerSwitcher: true, visibility: false,
minScale: 1733376.0653286723}
);
//Opening featureInfo code
var info = new OpenLayers.Control.WMSGetFeatureInfo({
url: 'http://localhost:8080/geoserver/wms',
layerUrls:
["http://localhost:8080/geoserver/gwc/service/wms"],
title: 'Identify features by clicking',
layers: [villages],
queryVisible: true,
eventListeners: {
getfeatureinfo: function(event){
Any ideas/hints/solutions would be so greatly appreciated!
Thanks,
elshae
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Disable-WMSGetFeatureInfo-for-layers-which-are-currently-not-visible-tp5964206p5964206.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users