Pacoverde Posted October 27, 2022 Share Posted October 27, 2022 (edited) I'm working on a 7.1 site for a Chinese nonprofit and am attempting to create some kind of map that visitors can click on to learn about China's development projects in various parts of the world. Being dismayed at not being able to use an old-school HTML image map to accomplish this, I've settled on what I think could be a solution: SVG polygons on top of a map of the world. Unfortunately, for this to work I need to be able to make each SVG image clickable. I've not found a way to make this work for more than just one SVG image. I've tried wrapping the "<a>" tag around the SVG "polygon" definition, wrapping the whole SVG definition with "<a href="..."> tags, but none of these work once I add then to more than one SVG image. To whit: Quote <div name="South_America"> <span class="tooltipText">South America</span> <svg width="360" height="250" style="stroke-width:3;stroke:yellow;"> <a href="https://ctea.earth/South_America"> <polygon points="91,146,83,172,97,183,99,228,112,230,109,209,136,167,113,154" /></a> </svg> </div> and Quote <div name="South_America"> <span class="tooltipText">South America</span> <a href="https://ctea.earth/South_America"><svg width="360" height="250" style="stroke-width:3;stroke:yellow;"> <polygon points="91,146,83,172,97,183,99,228,112,230,109,209,136,167,113,154" /> </svg></a> </div> Edited October 27, 2022 by Pacoverde Reformat second quote as code Link to comment
creedon Posted October 27, 2022 Share Posted October 27, 2022 Please see the following thread. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment