PDA

View Full Version : Image Map changing polygon shapes color


Jeff
10-10-2002, 12:36 AM
I have a map of North America and each state has the area defined with a polygon. I have a database table with the members in it that I query to see which states have members. If a state has members I need to change the background color for that state. How can I do this when the page is opened in a browser? Is it possible to change the background color in the polygon? Below is a sample of the code defining a state.


Thanks


<MAP NAME="map1">
<AREA
SHAPE="POLYGON" COORDS="122,14,122,14,114,57,92,50,74,52,60,47,49,33,53,0,71,0" HREF="/members/WA.HTML>
<AREA
SHAPE="POLYGON" COORDS="48,31,48,31,30,90,100,110,117,60,110,52,90,48,73,50,59,46" HREF="/members/OR.HTML
<AREA

martin_narg
10-10-2002, 07:39 AM
I'm not sure if this is the best way, but I ended up created a load of divs to cover the area shape and changing their background colour onmouseover.

m_n

Jeff
10-10-2002, 12:25 PM
martin:

I am not fimiliar with divs. Would I setup each area using div, then when the page was rendered check each area against the db table to determine if the color should be changed?

Thanks