SpryMap icon indicating copy to clipboard operation
SpryMap copied to clipboard

Click on the map

Open erossini opened this issue 10 years ago • 1 comments

Hi there, just a question. Did you have a way to insert some clickable area on the map? For example I want to insert on two different city on your map the possibility for a user to click and open a link.

Thank you in advance

erossini avatar Oct 20 '15 12:10 erossini

Hi there, I can reply myself. If you use a simple tag area, you can have a clickable map as in the following example

[code] <img id="worldMap" src="map.jpg" alt="A map of the world." usemap="#Map" /> <map name="Map" id="Map"> <area alt="" title="" href="#" shape="rect" coords="432,49,758,425" onclick="alert('Area1');" /> <area alt="" title="" href="#" shape="rect" coords="589,1586,772,1727" onclick="alert('Area2');" /> <area alt="" title="" href="#" shape="rect" coords="435,1259,681,1581" onclick="alert('Area3');" /> <area alt="" title="" href="#" shape="rect" coords="688,1585,780,911" onclick="alert('Area4');" /> </map> [/code]

erossini avatar Oct 21 '15 09:10 erossini