[OpenLayers-Users] Hover control sample (share)

Alexandre Dube adube at mapgears.com
Mon Jan 19 09:30:46 EST 2009


Hi Eric,

  I took a look at the SelectFeature control.  Now I understand what you 
meant and it makes sense.  Also, it's also making sense to have this 
control have the possibility to highlight on hover or on click.

  "beforefeaturehighlighted" and "featurehighlighted" events make sense, 
but a "featureunhighlighted" (or some other term meaning that the 
feature was highlighted and is now no more) would also be useful.

Alexandre

Eric Lemoine wrote:
> On Mon, Jan 19, 2009 at 2:34 PM, Alexandre Dube <adube at mapgears.com> wrote:
>   
>> Hi Eric,
>>     
>
> Hi Alexandre,
>
>   
>>  I don't think we should use a renderIntent value.  The main idea of the
>> Highlight feature is to change the style of a feature only when the mouse is
>> hover it and only that.
>>     
>
> I meant that when the feature is clicked or hovered it is redrawn
> using the render intent configured in the control:
>
> layer.drawFeature(feature, this.renderIntent);
>
>   
>> If we change the renderIntent of a feature, when
>> the mouse is no longer hover it, to what renderIntent we set it ?  If it was
>> "select", how do we know ?  We would need to keep track of the previous
>> renderIntent on hover.
>>     
>
> I'm suggesting to change the feature's render intent.
>
>   
>>  Also, I don't see the point of "highlighting" a feature on click.  The same
>> idea goes for the fact that I don't see the point of selecting a feature on
>> hover having HighlightFeature I can use.  When you select a feature, you
>> want to interact with it : modify, delete, display a popup that stays on
>> screen while the feature is selected, etc.  When hover, you it's only
>> temporary.
>>     
>
> With the select feature control one can choose whether to use "hover"
> or "click". Why not applying this to the highlight feature control?
>
>
> Regards,
>
> --
> Eric
>   


-- 
Alexandre Dubé
Mapgears
www.mapgears.com




More information about the Users mailing list