Necesito tener opciones para cargar img y drow area en ese img y guardar coordenadas en JSON. Similar como aquí https://www.image-map.net/
Busco bibliotecas pero nada que realmente pueda usar. Aquí está lib para angularJS, pero no se puede usar en angular 2+.
Con las coordenadas 'codificadas' está bien, pero necesito crearlas dinámicamente (el usuario dibujará el área) 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>