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

getfeaturenfo :function(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,
                        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?

closed as too localized by Devdatta Tengshe, whuber Feb 15 '13 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, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • is your polygon very small (i.e. on the order of 1-2 pixels wide)? – Ian Turton Jan 9 '13 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. – Smit Shah Jan 10 '13 at 4:17
  • try zooming in more before you click - hitting a 1-2 pixel wide polygon is hard :-) – Ian Turton Jan 10 '13 at 6:04