Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.


I got neighbor polygon feature info instated of clicked polygon feature info.
In My Code:

getfeaturenfo :function(e) {

            coordinates=e;
            var params = {
                        REQUEST: "GetFeatureInfo",
                        projection: "EPSG:4326",
                        EXCEPTIONS: "application/vnd.ogc.se_xml",
                        BBOX: map.getExtent().toBBOX(),
                        SERVICE: "WMS",
                        INFO_FORMAT: 'text/html',
                        QUERY_LAYERS: selectlayer(map.zoom),
                        FEATURE_COUNT: 50,
                        Layers: selectlayer(map.zoom),
                        WIDTH: map.size.w,
                        HEIGHT: map.size.h,
                        X:parseInt(e.xy.x),
                        Y:parseInt(e.xy.y),
                        CQL_FILTER:selectfilter(),
                        srs: map.layers[0].params.SRS};


                    // handle the wms 1.3 vs wms 1.1 madness
                    if(map.layers[0].params.VERSION == "1.3.0") {
                        params.version = "1.3.0";
                        params.i = e.xy.x;
                        params.j = e.xy.y;
                    } else {
                        params.version = "1.1.1";
                       params.y = parseInt(e.xy.y);
                        params.x = parseInt(e.xy.x);
                    }
                    OpenLayers.loadURL("http://myserver/tomcat/geoserver/india/wms", params, this, setHTML, setHTML);


In Layer Preview I got same issue,So is that problem with layer or with code?
N.B: If Polygon is big then it shows perfect featureinfo but when it's small then this issue occurs.
How Can I solve this issue?

share|improve this question
is your polygon very small (i.e. on the order of 1-2 pixels wide)? – iant Jan 9 at 14:08
Yes Some are 1-2 pixel wide, Actually what happen due to irregular shape if i click on any corner of polygon which is small it gives neighbor polygon feature information. – SmitShah Jan 10 at 4:17
try zooming in more before you click - hitting a 1-2 pixel wide polygon is hard :-) – iant Jan 10 at 6:04

closed as too localized by Devdatta Tengshe, whuber Feb 15 at 16:06

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.