ThinkGeo.com    |     Documentation    |     Premium Support

MouseHover Event on WpfMap

MapSuite Team,

I would like to make use of a MouseHover Event on WpfMap, but it appears there is no such map event.

My application implements an Identify Features function, but it requires a mouse-down from the user.

A MouseHover event will allow the application to present users with an abbreviated list of features wherever the mouse is hovering.

Can you offer suggestions how to simulate a MouseHover event? I’m thinking the next best event is MouseMove with a timer to determine if the mouse is hovering.

Thanks,
Dennis

Hi Dennis,

Yes you’re right, some scenarios can implement that by WPF control event ToolTipOpening, but it looks this way cannot get exact coordinates, so you are right, simulator for MouseHover event to write a timer, reset it in mouse move event, and put the event in the Elapsed event of timer, that should works.

Regards,

Ethan

Thanks for the confirmation.

Hi Dennis,

Any question please let us know.

Regards,

Ethan

hi Ethan,

I thought I would pose another question in this thread as it seems a nice continuation of subject.

The reason to implement MouseHover is to highlight the shape that the mouse is over. In the screen-capture below you’ll notice there is a WmsRasterLayer with a Buildings FeatureLayer where only the address is rendered. If the mouse is hovering over a building the outline of the building should appear and when the mouse moves the outline would disappear.

I’m thinking that the feature that the mouse is over would be copied into an InMemoryFeatureLayer with the appropriate styling applied.

Any guidance you can offer on the most efficient way to accomplish this?

Thanks,
Dennis

Hi Dennis,

I am ready to build a sample for it, but I found we already have a sample about that, I think that’s what you want:

Regards,

Ethan

Thanks for the mouse-hover and highlight application.

Dennis

Hi Dennis,

I am glad to hear that’s helpful.

Regards,

Ethan