Thank you very much, so now a
var xyz = new OpenLayers.Control.GetFeature({
protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer),
hover: true,
clickTolerance: 50
});
xyz.events.register("hoverfeature", this, function(e) {
var my_feature = new OpenLayers.Feature.Vector(e.feature.geometry,null,
style_obj1);
hover.addFeatures([my_feature],null,{styleMap: style_obj1});
});
....gives me what I wanted. :-)
Best regards, Kai
-------- Original-Nachricht --------
> Datum: Tue, 28 Jul 2009 16:45:25 +0200
> Von: Marc Jansen <[email protected]>
> An: Andreas Hocevar <[email protected]>
> CC: Kai Behncke <[email protected]>, [email protected]
> Betreff: Re: [OpenLayers-Users] Some question to
> OpenLayers.Protocol.WFS.fromWMSLayer
> Hi Andreas,
>
>
> Andreas Hocevar schrieb:
> > Hi Kai,
> >
> > Kai Behncke wrote:
> >
> >> 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).
> >>
> >>
> >>
> >>> var xyz = new OpenLayers.Control.GetFeature(
> >>> {
> >>> protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer),
> >>> hover: true,
> >>> styleMap: style_obj1
> >>> handlerOptions : {
> >>> hover: {
> >>> pixelTolerance : 10
> >>> }
> >>> }
> >>> }
> >>> );
> >>>
> >>>
> >
> > Almost. The snippet below should work:
> >
> > var xyz = new OpenLayers.Control.GetFeature(
> > {
> > protocol: OpenLayers.Protocol.WFS.fromWMSLayer(layer),
> > hover: true,
> > clickTolerance: 10
> > }
> > );
> >
> >
> > Maybe the name of that property (*click*Tolerance) is misleading, but
> > that one is used for every request.
>
> ... yipp, that was quite misleading. Thanks for the quick doc update!
>
> Marc
>
> > I just fixed the docs, now at least
> > there is a hint that this is also for requests on hover.
> >
> > Also note that Control.GetFeature cannot be configured with a styleMap.
> > You have to do this on the layer.
> >
> > Regards,
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users