[OpenLayers-Users] Some question to OpenLayers.Protocol.WFS.fromWMSLayer

Marc Jansen jansen at terrestris.de
Tue Jul 28 10:45:25 EDT 2009


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,




More information about the Users mailing list