First of all, this is a great article! It works very smooth and it's pretty easy to understand how the basics work. I do have a question/request though:
Do you suppose it is possible to adept the code to not light up on mouseover, but when a certain variable changes value? For instance a picture of a machine, and making the motor flash red when it has broken down? (strictly web-code wise, I know how to get the value to the website)
The problem is that Flash is used where it is needed (multimedia presentation sites) and where it is not (simple drop-down menus, for instance). This article presents a browser-native way of area highlighting, useful in a handful of situations => way to reduce your effort and costs.
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
as I see you as one of the programming gurus here at CP
People keep saying this to me.
To be honest I just dont get it.
I just read a lot and try things out that interest me, thats all.
So if people think im good, thats cool. But I simply write stuff I like. Thats it. No magic, I see 100s of people at codeproject that are every bit as good as what I do. I am constantly seeing thing I do not get or have not seen. There are tonnes of smart folk using this site.
I am only 1 of 100s possible 1000s of worthy people (you included) constributing to this site
Glad you are happy with my comment
A Modern Geek - I cook, I clean, I drink, I Program. Modern or what?
In real world map, you have multi-polygons. How does your library supports this? (the desired effect is when mouse in on one part, all the other parts of the polygon are highlighted).
If you mean "how several disconnected parts of a single country are highlighted", then the answer is:
1. When setting up the Lightmapper/v object and setting parameters for such an ("disconnected") area, you list all areas of original image-map that are connected to this particular area;
2. When SVG/VML polygons are created, each is assigned a list of connected polygons - based on a list of connected areas;
3. When polygon receives "onmouseover", it starts highlighting itself and sends a message to every connected polygon to highlight itself too. The same works for "onmouseout" message.
Paul Selormey wrote:
Will some AJAX stuff create more interactive effect?
The very idea of this script is a dynamic creation of interactive light-maps. Thus, nothing stops you from downloading area data via AJAX/Atlas and updating the interactive image map. The only stopping factor is your imagination
Hope it helps,
Listen up! Teamwork means staying out of my way! (Seifer, Final Fantasy 8).