FortNet

Server-Parsed Imagemap Files

Monday, 22-Feb-1999 11:56:43 MST
Michael Goshorn


  1. General Imagemap Information
  2. This document serves to clarify what is possible using the current Apache server.

    For detailed information on what an image map is, what tools are available to create map files and images, etc. please see Lisa Beal's Image Map presentation (http://www.fortnet.org/FortNet/HTML/Presentation/ImageMap/)

  3. Server-Parsed Imagemaps
  4. Before we intalled the Apache server, it was necessary to use a separate program ( htimage or NCSA imagemap) to process image map files and to place the map files in the cgi-bin directory.

    This is no longer the case. You may store the image and its associated map file in your own directories. The server then processes the map file as part of the normal html document parsing performed.

    Referencing your mapfile

    <A HREF="my_mapfile.map">
    <IMG SRC="my_mapfile.gif" ISMAP > </A>

  5. Mapfile Syntax
  6. Mapfiles used by the imagemap use the NCSA syntax: A mapfile is a plain text file containing target locations in pixel coordinates and URLs to be obtained when each target is hit. Several shapes of targets may be defined. The general format of each target specification is:

    Coordinates are x(left to right) and y(top to bottom) pixel counts separated by a comma. The URL may be relative or complete.

  7. Mapfile Example
  8. The map for the small logo at the top of the page is:

    default /FortNet/text.html
    rect /FortNet/help.html 173,21 250,41
    rect /FortNet/fortnet_home.html 5,0 250,20
    rect /FortNet/fortnet_home.html 5,22 169,41

  9. Reference Example
  10. <a href="/FortNet/images/sm_logo.map">
    <img alt ="FortNet" src="/FortNet/images/sm_logo.gif" border=0 ismap></a>


Home | Search | Help | Feedback

Copyright © 1998-2001 FortNet Inc.