how do i get the coords of an image

限于喜欢 提交于 2019-12-10 11:56:18

问题


I need to create a hotspot on an image and i need to have something like this

I have a picture on the united states like this but i need to turn it into a hotspot like this but viewing the source i see this

<area href="#" title="SC" shape="poly" coords="735,418, 734,419, 731,418, 731,416, 729,413, 727,411, 725,410, 723,405, 720,399, 716,398, 714,396, 713,393, 711,391, 709,390, 707,387, 704,385, 699,383, 699,382, 697,379, 696,378, 693,373, 690,373, 686,371, 684,369, 684,368, 685,366, 687,365, 687,363, 693,360, 701,356, 708,355, 724,355, 727,356, 728,360, 732,359, 745,358, 747,358, 760,366, 769,374, 764,379, 762,385, 761,391, 759,392, 758,394, 756,395, 754,398, 751,401, 749,404, 748,405, 744,408, 741,409, 742,412, 737,417, 735,418"></area>

Is there a tool i can use my png image on that will help me get the coords ..otherwise this will take forever for all the states.....


回答1:


If you had a source image that was, (for example) an SVG file, you could easily export the coordinates.

If all you have is a static image, then your best bet is to use a WYSIWYG editor.

For example, using Dreamweaver CS5, you can easily draw the shapes out:

I'm sure there will be some random free WYSIWYG editor that has this functionality. Alternatively, you could always just download the trial version of Dreamweaver CS5 purely to complete this task.




回答2:


It may be practical to just copy out that whole page and change what you want changed instead of starting from scratch. Obviously the working example you provided has all the cords in it already and therefore you have no need to make them again. Just copy out the working page and change it to suit your needs.



来源:https://stackoverflow.com/questions/5434757/how-do-i-get-the-coords-of-an-image

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