<%@LANGUAGE="VBSCRIPT" %> <% Response.CacheControl = "no-cache" %>
Creating Image Maps
HOW TO CREATE AN IMAGE MAP IN PHOTOSHOP (rectangle)
  • Open Photoshop (Start -> Programs -> CG Applications -> Adobe Photoshop)
  • Select File -> Open, and find the image you would like to use an image map on.
  • Make any changes to the image size, cropping, etc.
  • Make sure that the image is in RGB mode and either a .gif, a .jpg or a .png.
  • Save the image in the correct folder for your Web site.
  • In the "Navigator" pallet, select "Info" - If the pallet is missing go Window -> Navigator.
  • Mouse over your image and make sure that the X & Y coordinates are in pixels - If it has decmil points it is in inches and it needs to be change.
  • To change from inches to pixels go Edit -> Preferences -> Unit & Rulers, change the dropdown box next to Rulers to pixels, hit OK.
  • Mouse over your image and make sure that the X & Y coordinates are in pixels - if not repeat the above process.
  • In the Tools pallet, select the Marquee Tool (M).
  • Mouse over your image and click where you would like the map the begin.
  • Make note of the X & Y coordinates, write them down.
  • Click and drag the box around where you want your image map to be.
  • Before you let go, make note of the ending X & Y coordinates, write them down.
  • Load up the XHTML page in Textpad that you will be working with.
  • Place the image into your code like any other image.
  • Add one extra attribute in your image tag called usemap=" ".


HOW TO PLACE IMAGE MAP CODE IN YOUR XHTML DOCUMENT
  • Inside your body tag (somewhere) open a map tag (<map> and </map>).
  • Add the attributes name=" " and id=" " into your opening map tag - this will be the name you reference in your image tag.
  • Inside the map tag, open an area tag (<area />).
  • Add the attributes shape=" ", coords=" ", href=" ", target=" ", and alt=" ".
  • shape=" " - rect, circle, poly
  • coords=" " - x,y,x,y (x of starting point, y of starting point, x of ending point, y of ending point)
  • href=" " - where you want the image map to lead to (the URL)
  • target=" " - where you want the page to load
  • alt=" " - a description of what the link is going to lead to
  • In your image tag, set the usemap attribute to the name of your map - example: usemap="#myMap"
  • Save and test.