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 <[EMAIL PROTECTED]> An: [email protected] 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 <[EMAIL PROTECTED]>: > > 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
