area map mouseover highlights

Within a image map, using a polygon shape reference, how can the co-ordinates be highlighted?

<img src="World_Map_(Simple)" id="worldmap" width="1427" height="628" border="0" usemap="#map" />

<map name="map" id="map">

<area shape="poly" coords="923,263,926,267,928,269,933,268,935,267,934,264,935,262,937,263,939,269,938,273,938,277,940,280,939,283,945,292,948,299,949,304,956,316,957,321,957,324,962,326,966,321,969,317,969,306,971,304,972,302,970,300,970,294,977,288,980,287,983,281,986,279,994,272,996,270,995,268,995,266,999,265,1005,263,1002,258,1003,255,998,246,1000,244,1008,250,1012,250,1015,251,1015,257,1019,263,1022,256,1024,250,1025,243,1029,241,1032,237,1033,236,1025,232,1020,232,1015,235,1014,238,1011,239,1010,242,1006,243,1004,242,1001,241,1000,236,997,236,996,237,997,241,995,244,980,240,971,237,963,233,962,231,963,228,965,226,954,220,954,218,955,214,955,210,955,206,946,202,943,205,941,207,937,206,934,206,932,208,933,214,940,217,939,219,939,222,937,225,935,228,933,232,931,235,924,237,921,242,926,248,929,250,928,253,924,255,921,253,918,257,921,259,925,259,926,262" alt="india" href="http://www.india.com" />
<area shape="poly" coords="1223,535,1215,535,1207,541,1202,536,1197,538,1186,533,1188,529,1187,525,1186,518,1182,523,1188,514,1186,514,1177,520,1173,514,1166,508,1152,508,1132,514,1121,516,1113,518,1104,521,1096,517,1100,514,1103,505,1102,500,1101,488,1103,469,1104,464,1127,455,1134,454,1141,450,1144,441,1149,443,1150,440,1149,438,1152,437,1158,429,1166,426,1169,430,1174,433,1175,430,1176,426,1180,424,1179,422,1185,420,1192,417,1203,421,1199,429,1199,432,1216,445,1224,435,1225,426,1230,414,1233,425,1239,433,1240,438,1241,442,1239,446,1246,457,1254,470,1259,479,1260,483,1258,494,1254,502,1245,513,1239,515,1235,522,1229,527" alt="Austrialia" href="http://austrialia.com" />
<area shape="poly" coords="1266,569,1264,572,1265,573,1272,574,1275,573,1281,570,1287,563,1292,563,1295,561,1301,556,1306,553,1314,551,1321,546,1327,542,1333,535,1330,536,1324,533,1324,527,1325,525,1321,521,1322,525,1323,528,1323,533,1322,536,1314,542,1314,546,1312,550,1304,548,1300,550,1296,554,1290,558,1284,561,1280,563" alt="newzealand" href="http://www.newzealand.com" />
</map>

Open in new window

LVL 6
patelbg2001Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rainer JeschorCommented:
Hi,
the problem is that the area does not support styling, hence you have two options:
- Create a dedicated image based on the original map - highlighting an area in each image (in your above sample case it would be 4 images: one "blank" / unhighlighted and three images where one area is highlighted

- Create a Canvas on top of the map, using the same coords to draw dynamically outlines

Could you perhaps attach your original world map image for prototyping?

Thanks and HTH
Rainer
0
patelbg2001Author Commented:
Thanks, I'm new to all this. I've attached the map.
How is the original image highlighted to create a secondary image?
WorldMap.png
0
Rainer JeschorCommented:
Hi,
thanks for the image.

Using a good photo / image editing tool. Due to the borders, it should be possible to select a country and change the color of it.
As there are >200 countries in the world (and even if you just use the top 100), I doubt that this will make fun :-)
I would prefer the other way - I will try to prototype something tonight (german time zone).

KR
Rainer
0
Rainer JeschorCommented:
Hi,
I have attached two HTML pages - one with pure Javascript the second one also incorporating jQuery to dynamically bind the events to the area tags.

Both work like a charm :-)

HTH
Rainer
EEAreaShape.html
EEAreaShape-jquery.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
patelbg2001Author Commented:
Thanks, I will try on my Mac this weekend. Is the official term for this called  'dynamically bind'? (I'm learning the basics of JavaScript)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.