c#-mapscript, queryByPoint

Tamas Szekeres szekerest at GMAIL.COM
Fri Jul 21 09:53:11 EDT 2006


Christian,

You should set the classObj.template instead of the layerObj.template.
An empty template file should be  sufficient.

How about your previous problem? I could not get your sample project
for reproducing it.

Best Regards,

Tamas


2006/7/21, Christian Wilmes <C.Wilmes at gmx.de>:
> 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