Hi Marc, thank you for that hint, but unfortunately it doesn` work (well, the pixel tolerance works but then the coordinate is not fitted and it gives an "empty"-WFS result).
I will try on. Best regards, Kai -------- Original-Nachricht -------- > Datum: Tue, 28 Jul 2009 15:19:43 +0200 > Von: Marc Jansen <[email protected]> > An: Kai Behncke <[email protected]> > CC: [email protected] > Betreff: Re: [OpenLayers-Users] Some question to > OpenLayers.Protocol.WFS.fromWMSLayer > Hi Kai, > > a quick guess: have you tried setting the pixelTolerance-property of the > hover-handler? > > var xyz = new OpenLayers.Control.GetFeature( > { > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer), > hover: true, > styleMap: style_obj1 > handlerOptions : { > hover: { > pixelTolerance : 10 > } > } > } > ); > > untested as usual. > > Regards, > Marc > > > > > Kai Behncke schrieb: > > Dear users, > > > > I use the following code to get a highlighting if s.o. does "mouseover" > > on a wfs-point: > > > > var xyz = new OpenLayers.Control.GetFeature({ > > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer), > > hover: true, > > styleMap: style_obj1 > > }); > > > > xyz.events.register("hoverfeature", this, function(e) { > > hover.addFeatures([e.feature]); > > }); > > map.addControl(xyz); > > xyz.activate(); > > > > > > > > ....it works well, but nevertheless I have two questions: > > > > > > 1) With that way users get rarely a result, because doing a mouseover on > a single-coordinate > > off course is quite difficult (it nearly never fits the point). > > > > Is there a way to set a buffer to the WFS-points (not in the database > where the coordinates are > > situated but directly in OpenLayers), so that it`s easier to get a > point? > > > > > > 2) Even I declared an own style in the "var xyz"-section I still get the > typical-wfs-orange-opacity style. > > > > If I write: > > > > var my_feature = new OpenLayers.Feature.Vector(e.feature.geometry,null, > style_obj1); > > hover.addFeatures([my_feature]); > > > > I get what I want, but I wonder if there is a ways doing something like > > > > hover.addFeatures([e.feature],{styleMap: style_obj1}); ??? (it doesn`t > work in this way). > > > > > > Thank you very much, Kai -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
