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

357
Views
Draw area on image to get coordinates

I need to have options to upload img and drow area on that img and save coordinates to JSON. Similar like here https://www.image-map.net/

I search for libraries but nothing that I can really use. Here is lib for angularJS, but can not use it in angular 2+.

With 'hard-coded' coordinates it is ok, but I need to create them dynamically (user will drow area) Thnx

<!DOCTYPE html>
<html>
<body>

<h2>Image Maps</h2>
<p>Click on the computer, the phone, or the cup of coffee</p>

<img src="https://www.w3schools.com/html/workplace.jpg" alt="Workplace" usemap="#workmap" width="400" height="379">

<map name="workmap">
  <area shape="rect" coords="34,44,270,350" alt="Computer" onclick="myFunction('Computer')">
  <area shape="rect" coords="290,172,333,250" alt="Phone" onclick="myFunction('Phone')">
  <area shape="circle" coords="337,300,44" alt="Cup of coffee" onclick="myFunction('Cup')">
</map>

</body>
</html>

<script>
function myFunction(item) {
  alert(item);
}
</script>

over 4 years ago · Santiago Trujillo
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!