title: How to Automatically Create ImageMaps of Grey Maps from Wikipedia?
body: <p>I have a project using various members of Wikipedia's grey maps: <a href="http://en.wikipedia.org/wiki/Wikipedia:Blank_maps" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Wikipedia:Blank_maps</a>.  I fill them in with colors depending on which countries, states or provinces a user selects by clicking on the shape or by checking a checkbox.  </p>
  
  <p>I would like to write a script that creates imagemaps automatically of each country, state or province by somehow getting the X and Y pixel location of the borders of a country, state or province albeit without the names of these entities, which I will fill in later.  I have already done the World map by hand and found a open source US map image map demo.  I would now like to create my maps more rapidly.</p>
  
  <p>I use PHP and GD to floodfill the shapes, so I guess I could use one central pixel location of  the shapes as well.  Any suggestions?  This script is a possibility but is still somewhat manual: <a href="http://abhinavsingh.com/blog/2009/03/using-image-maps-in-javascript-a-demo-application/" rel="nofollow noreferrer">http://abhinavsingh.com/blog/2009/03/using-image-maps-in-javascript-a-demo-application/</a>.  Also Mapedit, <a href="http://www.boutell.com/mapedit/" rel="nofollow noreferrer">http://www.boutell.com/mapedit/</a>, has a magic wand feature that works pretty well, but again I have a feeling this can be done automatically.</p>