Clickable map of a country

L

Lando Chez

Hi

I need a map of a country on which a region( part of the map) can be
clicked ( or on mouseover) causing, on another part of the same page,
the appearance of information regarding the region.

I know how to show the information based on another part of the page,
but I don't know how to make a map of a country clickable ( meaning,
clicking different part of the map to show info on the page).
How can I make a map of a country with different clickable regions?

Regards
 
E

Evertjan.

Lando Chez wrote on 27 jun 2005 in comp.lang.javascript:
I need a map of a country on which a region( part of the map) can be
clicked ( or on mouseover) causing, on another part of the same page,
the appearance of information regarding the region.

I know how to show the information based on another part of the page,
but I don't know how to make a map of a country clickable ( meaning,
clicking different part of the map to show info on the page).
How can I make a map of a country with different clickable regions?

<map name="myMap">
<area shape="rect" coords="182,30,506,111" nohref
onMouseOver="show(1)">
<area shape="rect" coords="1,111,70,241" nohref
onMouseOver="show(2)">
.........
</map>

<img src="/images/map.jpg"
usemap="#myMap"
onMouseOut="endshow();">
 
M

McKirahan

Lando Chez said:
Hi

I need a map of a country on which a region( part of the map) can be
clicked ( or on mouseover) causing, on another part of the same page,
the appearance of information regarding the region.

I know how to show the information based on another part of the page,
but I don't know how to make a map of a country clickable ( meaning,
clicking different part of the map to show info on the page).
How can I make a map of a country with different clickable regions?

Regards

Creating Image Maps
http://www.elated.com/tutorials/authoring/html/imagemaps/

"For example, if you wanted the user to choose a country from a world map
image, you could use the server-side script to calculate which country was
clicked on, and then display information about that country."
 
L

Lando Chez

Hi

Thank you for the code. Can you explain to me what the coordinates
stands for in the coords="182,30,506,111" part?

regards
 
E

Evertjan.

Lando Chez wrote on 27 jun 2005 in comp.lang.javascript:
Thank you for the code. Can you explain to me what the coordinates
stands for in the coords="182,30,506,111" part?

Please always quote. This is usenet, not email, and others want to follow
too.
<area shape="rect" coords="182,30,506,111" nohref
onMouseOver="show(1)">

Left, top, right, bottom position in pixels, I think, try it.

Also shape="poly", with multiple points is usefull.

<http://www.htmlcodetutorial.com/images/_AREA_SHAPE.html>
 
D

DJ Craig

The easiest way to create a big imagemap, like one with the a map of
the US, and 50 regions is to use a program like Dreamweaver. Frontpage
or GoLive can probably do it too, but I've never tried. I normally
code everything by hand, but imagemaps just take way too long to do by
hand.
 
L

Lando Chez

Hi

Thank you very much for the link. With the tutorial I created my own
image cool. It looks realy cool!!!
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Mon, 27
Jun 2005 11:16:17, seen in Evertjan.
Lando Chez wrote on 27 jun 2005 in comp.lang.javascript:


Please always quote. This is usenet, not email, and others want to follow
too.

Please always, at least until it is in the FAQ, explain the way to do it :

If you find that, when you start a News reply, Google does not provide
the previous article in quoted form, note what Keith Thompson wrote in
comp.lang.c, message ID <[email protected]> :-
If you want to post a followup via groups.google.com, don't use
the "Reply" link at the bottom of the article. Click on "show
options" at the top of the article, then click on the "Reply" at
the bottom of the article headers.

Since that is what the experts in this newsgroup prefer to read, it will
be to the OP's advantage to comply.
 
E

Evertjan.

Dr John Stockton wrote on 28 jun 2005 in comp.lang.javascript:
If you want to post a followup via groups.google.com, don't use
the "Reply" link at the bottom of the article. Click on "show
options" at the top of the article, then click on the "Reply" at
the bottom of the article headers.

Slightly OT:

I found that the Google Groups reply buttons cease to exist
on mail older than a certain age!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,128
Latest member
ElwoodPhil
Top