Identify specific zones on an image map

While working on my website, I utilized the services of a site called to generate an image map. However, I faced an issue where there was no visual indication that the continents were clickable links. My aim is to have an icon overlaid on each continent that changes color upon hovering or ideally highlights the continent itself.

Unfortunately, using SVG for highlighting would not be compatible with IE8, so I resorted to overlaying icons using absolute positioning. This led to a dilemma as the link needed to be on the icon and not within the image map, rendering the mapping process redundant.

My query revolves around finding a way to utilize the already defined mapped areas to overlay icons on each continent while retaining the link functionality seamlessly. I attempted embedding spans within area tags but to no avail. Any guidance or alternative strategies would be highly appreciated.

I've included the HTML and CSS code snippets for reference:

<div class="worldMap">
   <img src="http://s30.postimg.org/8bqsljpvl/worldmap.png" alt="" usemap="#map1400147861975">
   <map id="map1400147861975" name="map1400147861975">
     <area shape="rect" coords="109.99999559765627,10.999995597656266,159.46666159765627,34.46666159765627" title="Europe" alt="Europe" href="#Europe" target="_self">
     <!-- Rest of the area definitions go here -->
   </map>
</div>
.europe{
  position: absolute;
  left: 125px;
  top: 22px;
  color: blue;
}

worldMap{
  position: relative;
}

For a live demonstration, you can check out this fiddle: http://jsfiddle.net/jezzipin/z6UnR/2/

Answer №1

I believe that creating 6 new images for each hovered area would be the best approach. By changing only the specific color of the hovered area, you can achieve a dynamic effect.

Using JavaScript, you can ensure that the correct image is loaded for each area upon hovering. I have worked on a similar project before, but I am still in the process of finding it.

Please allow me some time to locate it.

PS: If you're looking for an alternative mapping program, consider trying out "Fast Image Map".

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How to position text in the center of an image and ensure it is responsive?

I am currently in the process of trying to center the text "WHAT" over the image in col-2. <div class="row"> <div class="col-2"> <div class="stackParent"> <img class="stack-Img" ...

Adjust font size proportions in CSS3

I am currently experimenting with the new font-face feature in CSS3 to use custom TTF/OTF fonts. My question is: can I adjust the default font size ratio? For example, if I am using Tahoma with a default 9pt font size and want to switch to my own custom ...

Working with arrays of objects in D3.js using Javascript

Seeking guidance as I navigate through the world of javascript and D3.js. I have two distinct data sets (arrays of objects) that I hope to merge. My goal is to align the National Average Scores with the State Average Scores by matching the 'Answer&ap ...

What steps can be taken to safeguard data while navigating within the Angular framework?

I am facing an issue with storing an array of items in a service (referred to as cart service) and displaying it in the component (cart.component.ts). The components bgview.component.ts and single.component.ts are involved in selecting individual items, wi ...

Unending cycle of jQuery focus() event within a <select> element

This is the HTML code I am working with: <select id="select-one"> <option value="">Choose</option> <option value="1">House</option> </select> <select id="select-two"> <option value="">Choose< ...

Utilizing Zebra Printers for Seamless Integration and Printing in Ext Js

I'm currently working on developing an app in ExtJs that involves printing a PDF label for warehouse purposes using Zebra smartphones connected to printers via Bluetooth. I've been trying to implement Zebra's APIs specifically the BrowserPri ...

Tips for monitoring transactions/events on a particular wallet with ethers.js?

Is there a method to monitor all transactions labeled as "mint" occurring on a designated wallet using ethers.js? While I am aware of the option to establish a filter for tracking a particular event signature, my aim is to keep tabs on all "mint" events, e ...

Enhance the interoperability of Babel with Express.js by steering clear of relative

My current approach to imports is as follows: import router from '../../app/routes' Is there a way to avoid using ../../, for example: import router from 'app/routes'? In typescript, I can achieve this with the following configuratio ...

tickPositions becomes undefined upon introducing a second Y-Axis

I encountered an issue with my Highcharts chart when using the addSeries method along with two Y-axes. As this project employs Backbone, I have simplified the code in a JSFiddle that can be accessed here: http://jsfiddle.net/michalcarson/V84pP/. The code ...

What are the steps to save data on a user's computer through a web browser?

Is it feasible to save data in the client's computer using a web browser and jQuery code to interact with the file system? ...

Tips for steering clear of getting caught in the initial focus trap

I have implemented Focus-trap (https://www.npmjs.com/package/focus-trap) in my modal to enhance keyboard accessibility. Here is a snippet of my code: <FocusTrap focusTrapOptions={{onDeactivate: onClose}} > <div> ... </div> <Focu ...

Struggling to retrieve a particular user using ExpressJs due to an error

Looking to retrieve a specific user in ExpressJS from a JSON file. Encountering this error message: UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client This is the snippet of code being u ...

Looking to develop a dynamic password verification form control?

I am in the process of developing a material password confirmation component that can be seamlessly integrated with Angular Reactive Forms. This will allow the same component to be utilized in both Registration and Password Reset forms. If you would like ...

When attempting to click the "New" button in a lightning datatable to add a new row, an error

Having trouble adding a new row when clicking the New Button in a Lightning Data table. I've created a lightning-button in HTML and called the method in JavaScript. However, when I click the New button, I'm getting an error message saying Undefin ...

Adding an <a> tag to Flickity: Step by step guide

Is there a way to incorporate tags into a Flickity image slider without affecting its functionality? Here's the code snippet I have for the slider: <div class="carousel" data-flickity='{ "imagesLoaded": true, "percentPosition": false, "auto ...

What is the proper way to utilize props.theme.breakpoints in conjunction with the makeStyles hooks?

Can anyone help me understand how to incorporate the Material breakpoints provided at https://material-ui.com/customization/breakpoints/ into the makeStyles hook for responsive styling? I am having trouble using props.breakpoints.down('600') with ...

Editing the content of a div in real-time by dynamically updating the innerHTML

Looking for a way to dynamically change the innerHTML of a contentEditable div using pure JavaScript, without relying on the Rangy library. I want the change to occur on keyup without losing cursor position or focus. Here is an example setup: <div id=" ...

How can I implement a jQuery modal dialog that loads a form page with pre-existing jQuery code for Autocomplete functionality?

I am facing an issue where I have a dynamically generated form on a web page and I want to display it using the jQuery UI modal dialog. Previously, I was suggested a solution that worked when my form did not already contain jQuery UI components like Autoc ...

Utilizing jQuery in Wordpress to Toggle Content Visibility

Currently, my website pulls the 12 most recent posts from a specific category and displays them as links with the post thumbnail image as the link image. To see an example in action, visit What I am aiming to achieve is to enhance the functionality of my ...

Design an interactive listbox with both HTML and Angular that allows for multiple selections

I am trying to implement a multi select listbox with keyboard navigation capability. Currently, this is the HTML layout I have: <div> <div *ngFor="let tag of tags; let index=index" [class.selectedRow]="rowIsSelected(tag.id) ...