c#-mapscript, queryByPoint

Christian Wilmes C.Wilmes at GMX.DE
Fri Jul 21 04:37:29 EDT 2006


Hi All,

I try to query a point-layer in my c#-mapscript application. For that I write a function in my class Layer (base-class is layerObj) which should give me back a feature. I'm sure the point-coordinates I give in the function exists in the layer. But I got no result from the query. I think the reason could be the template. I red, that I have to set that propertie. So I create just create a html-document and set the propertie to it. Is there something that have to be in the document or is a empty document enough? What else could be the reason for getting no results?


public class Layer : layerObj
:
:
        public shapeObj QueryByPoint(Map map, pointObj point)
        {
            base.template = Environment.CurrentDirectory + @"\Query.html";
         
            base.tolerance = 1;
            int query = base.queryByPoint(map, point, mapscript.MS_SINGLE, 1);
            int numRes = base.getNumResults();
            int open = base.open();
            resultCacheMemberObj result = base.getResult(query);
            shapeObj shape = base.getFeature(result.shapeindex, result.tileindex);
            base.close();
           
            return shape;
        }
}


Best Regards
Christian
-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



More information about the mapserver-users mailing list