[OpenLayers-Users] Hover control sample (share)

Alexandre Dube adube at mapgears.com
Thu Jan 15 13:52:03 EST 2009


Yeah, I saw your example a couple of days ago.  It's a great tool.  As 
vector features are longer to draw than samples images generated by WMS 
requests I find this quite useful.

The slow rendering of vector features has been one of my worries.  A 
common practice is to normalize the geometry for a given scale or have 
different data per scale on the server side.  With that in mind, I 
wanted my vector layer to load features from different data source.  See 
the example :

http://dev4.mapgears.com/bdga/options-by-zoom-hover-bdga.html

This combine the above idea ( multiple data sources ) with the Hover 
control.  The result is quite fast.  What do you think ?

Alexandre

Andreas Hocevar wrote:
> Hi,
>
> On Thu, Jan 15, 2009 at 6:10 PM, Eric Lemoine <eric.c2c at gmail.com> wrote:
>   
>> Thanks for sharing your code Alexandre.
>>
>> I thought about a Feature control in the past. That control would use
>> a Feature handler internally and would be configured to work either in
>> hover or click mode, just like the SelectFeature control. But, as
>> yours, it wouldn't select features, but just trigger events when
>> features are hovered or clicked. To avoid code duplication I also
>> imagined that the SelectFeature control could be based on that control
>> instead of relying directly on the Feature handler.
>>     
>
> just a quick note: I have chosen the same approach (a control that
> just triggers events) for the WFSGetFeature control [1]. See the
> example [2] for more details. I'll create a ticket with a patch during
> the process of getting the new WFS stuff from the topp/wfs sandbox
> into trunk.
>
> Regards,
> Andreas.
>
> [1] http://trac.openlayers.org/browser/sandbox/topp/wfs/lib/OpenLayers/Control/WFSGetFeature.js
> [2] http://dev.openlayers.org/sandbox/topp/wfs/examples/wfs-getfeature.html
>
>   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list