Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
Creating a map with clickable icons based on a .PNG image?

I have a png image of a map of the UK, and I want to place pin icons at coords on the map which when clicked will redirect you to a page with more info about that location.

I have tried using a <map> with <area>'s however the area elements cannot have icons as far as I can tell.

I have also tried absolutely positioning an icon on the map however as soon as I switch the resolution my positioning is ruined.

Has anyone done this before or have any ideas of how to do? Thanks.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I've had success doing this before using absolute positioning with percentages. You just need to be quite precise with your percentage values. Here's a quick example with a PNG marker over London, it works well when I resize it:

.container {
  max-width: 800px;
  min-width: 300px;
  position: relative;
}

.container img.map {
  width: 100%;
  height: auto;
}

.marker {
  position: absolute;
  z-index: 1;
  width: 8%;
}

.marker img {
  width: 100%;
  height: auto;
}

.marker.first {
  top: 74.5%;
  left: 78.7%;
}
<div class="container">
  <img class="map" src="https://geology.com/world/united-kingdom-map.gif" />
  
  <div class="marker first">
    <img src="https://static.thenounproject.com/png/5025-200.png" />
  </div>
</div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!