how code imagemaps
-
I am trying to code 2 imagemaps, each of which appear on a separate page. Using WP 4.1, but am using the X theme. Don’t wish to use twenty fifteen theme and am not sure that it’d make too much difference.
The imagemaps are country maps from Latin America in the 1850’s and have many polyshapes. Originally I used the plugins “ImageMapper” and “Responsive Image Maps” but have disabled those as they don’t work. After using them all of the mapped regions will shift to the left & up so they no longer correspond to the map. It takes a lot of work mapping 30 irregular countries and then when they all mysteriously shift somewhere, all that work is lost. Thus it’s necessary to have the actual poly coordinates.
Thus trying html code for image maps.
Site is here:
http://coinsandhistory.com/
Have tried 2 coding examples for South America, the menu item
“mapz South America backup” uses the following code which I found in this forum.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ Moderator note: Code fixed, please wrap code in backticks or use the code button. ]
<div> <img class="alignnone" id="imagemap" src="http://coinsandhistory.com/www/wp-content/uploads/2014/12/map_South_America_Milners_1850_714px.png" alt="" width="569" height="714" usemap="#southamerica" border="0" /> <map name="southamerica" id="southamerica"> <area shape="poly" coords="106, 226, 100, 238, 100, 250" href="http://coinsandhistory.com/countries/Argentina.html" alt="" /> <area shape="poly" coords="353, 126, 318, 132, 296, 145" href="http://coinsandhistory.com/countries/Peru.html" alt="" /> </map> </div>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note, the poly coords have been truncated to save space here, to only 6 entries. I’ve verified that my maps are in the place quoted. Yes I know after this forum that I should use a .jpg rather than a .png. Also I’ve disabled the visual editor for all users of my website.The “South America” Menu item uses other coding for the same imagemap which also doesn’t work.
Thanks for helping. This is a free informational website, not one that sells anything. After reading these forums, I’ve never found a working imagemap using code. Is this incompatable with WP for some reason?
The topic ‘how code imagemaps’ is closed to new replies.