user494461
user494461

Reputation:

draw an interactive map using html5?

how do I draw an interactive version of this map http://www.toytowngermany.com/munich/ubahn_english_small.jpg

I want the user to be able to click at the intermediate nodes and add data! should I use html5 canvas tag with .svg files?

Upvotes: 1

Views: 4582

Answers (2)

Kel
Kel

Reputation: 7780

There are HTML4 <map> and <area> tags, which can be used to add interactive areas on image.

Example:

<img src="image.gif" usemap="#mymap" />

<map name="mymap">
  <area shape="rect" coords="10,10,80,80" onclick="..." />
  <area shape="circle" coords="100,100,80" onclick="..." />
</map>

Upvotes: 1

esamatti
esamatti

Reputation: 18944

You can just use SVG and script it directly with DOM.

You should take a look at Raphaël. It allows you to do cross browser vector graphics.

http://raphaeljs.com/

Upvotes: 2

Related Questions