c#-mapscript, queryByPoint
Christian Wilmes
C.Wilmes at GMX.DE
Fri Jul 21 07:41:44 PDT 2006
Thanks Tamas,
with the template in the classObj it works very well.
Best Regards
Christian
-------- Original-Nachricht --------
Datum: Fri, 21 Jul 2006 15:53:11 +0200
Von: Tamas Szekeres <szekerest at GMAIL.COM>
An: MAPSERVER-USERS at LISTS.UMN.EDU
Betreff: Re: [UMN_MAPSERVER-USERS] c#-mapscript, queryByPoint
> 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
> >
--
Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl
More information about the MapServer-users
mailing list