By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,411 Members | 1,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,411 IT Pros & Developers. It's quick & easy.

Clickable map of a country

P: n/a
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

Jul 23 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
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();">
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #2

P: n/a
"Lando Chez" <go********@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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/auth...tml/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."
Jul 23 '05 #3

P: n/a
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

Jul 23 '05 #4

P: n/a
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.

I wrote: <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>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #5

P: n/a
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.

Jul 23 '05 #6

P: n/a
>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


Have a look at this http://www.vmm.be/geoview/

And have a look at the page-sources.

Jul 23 '05 #7

P: n/a
Hi

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

Jul 23 '05 #8

P: n/a
JRS: In article <Xn********************@194.109.133.242>, dated Mon, 27
Jun 2005 11:16:17, seen in news:comp.lang.javascript, Evertjan.
<ex**************@interxnl.net> posted :
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.


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 <ln************@nuthaus.mib.org> :-
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.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #9

P: n/a
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!
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.