how to visualise/debug an imagemap?

三世轮回 提交于 2019-11-30 01:56:41

问题


I'm dynamically generating an imagemap for a chart tool I have.

I was hoping to be able to set a border or color on the area tags so I could check everything was being generated with the right coords, but a little research shows this is not possible.

So whats the easiest way to check my image map is correct? Are there any browser tools which will "visualise" the areas?


回答1:


What about using JavaScript (and jQuery) to test it?

http://davidlynch.org/js/maphilight/docs/demo_usa.html

This plugin will highlight image map areas.




回答2:


You can use FireBug for that:

  • Right-click your image and choose "Inspect Element with FireBug"
  • In the HTML tab of Firebug, the image tag is highlighted: locate and expand the associated map tag, which usually is right after it
  • You can now place your mouse over each area tags to see them highlighted over your image



回答3:


Image Map Editor is a plug-in for Firefox. It is the best tool I have found so far, makes creating, inspecting, and editing image maps very easy.




回答4:


One way to visualize an area tag in Chrome is to add a tabindex to the area tag(s) you want to see, and then click or tab to it. Chrome will nicely highlight the actual outline of the clickable area.

This solution unfortunately doesn't work in Firefox.




回答5:


Never thought I would ever say that, but this is one of the few cases where Dreamweaver could be helpful. You'll have an interface, you will be able to work with anchor points and set your imagemap easily.



来源:https://stackoverflow.com/questions/1998866/how-to-visualise-debug-an-imagemap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!