Where are OnMouseOver and OnMouseOut event ?

Last post 3/28/2010 4:58:38 PM by Chris Pietschmann. 1 replies. << Back to Web.Maps.VE v3.0 General
3/8/2010 5:00:42 PM
franck

Where are OnMouseOver and OnMouseOut event ?

Hi,

I have my own custom set of icons that I use to display pushpins, but I can't figure out how to add the OnMouseOver event, which would change the pushpin's icon to a new one, indicating the user that it is currently selected. I know there's a way to do this using JS with the VEMap.AttachEvent("OnMouseOver", MouseOverEvent) fonction.

 Is there a way to do this using Simplovation's server control ?

Please help,

Thx, Franck

3/28/2010 4:58:38 PM
Chris Pietschmann

Re:Where are OnMouseOver and OnMouseOut event ?

The OnMouseOver and OnMouseOut events can be handled using Web.Maps.VE using JavaScript code. You can reference the "Advanced JavaScript - Mouse Event Handling" example within the Sample Website to see examples of how to attach your own JavaScript code to these events.

Here's an additional link with a couple articles on using JavaScript code with Web.Maps.VE to manipulate the map: http://blog.simplovation.com/blog/?tag=/javascript

The reason the OnMouseOver and OnMouseOut events are not wired up to be handled from within Server-Side code is because the lag that handling those particular events within Server-Side code often prevents the handling code from being practical. Essentially the handling of these two events needs to happen immediately, and using a small postback behind the scenes to do it isn't practical since it causes a small lag between the event firing and the applications reaction.

You will need to use the Web.Maps.VE controls JavaScript API to handle the OnMouseOver and OnMouseOut events from within JavaScript code.