Create Client-Side Imagemaps: Image Mapname Deathstar - JPG Stationmap
Create Client-Side Imagemaps: Image Mapname Deathstar - JPG Stationmap
Client-side imagemaps are clickable images that don't require a CGI program to
make them work. Instead, the browser interprets the imagemap based
on HTML tags. Because they are faster and more reliable, client-side imagemaps
have largely supplanted server-side imagemaps.
To set up a client-side imagemap, create the image that you want to use as a map.
Then, in the HTML document where you want the imagemap to appear, enter the
following HTML tag:
Replace image with the URL of the image that you want to use as a clickable image.
Replace mapname with the name of the map definition (described below). For
example, if the name of your image is deathstar.jpg and the map information is in
the map definition named stationmap, you would type:
Use a program like Photoshop or PaintShop Pro to determine the coordinates (in
pixels) of the borders of your regions. Once you have accomplished that, you will
need to specify what regions of the image correspond to what URLs. Create the map
definition in the following format:
<MAP NAME="name">
</MAP>
Replace name with the name of this map (for example, stationmap).
Replace method with the shape of the region to be mapped (that
is, rect, circle, or poly).
o rect: The simplest method, the coordinates define the x,y of the upper left
corner and the coordinate of the lower right corner, in that order.
o circle: The three coordinates for a circle represent the x,y coordinates for the
center of the circle, and the radius of the circle in pixels, in that order.
Replace coordinates with the x and y coordinates that mark the parts of the
image that delimit the region.
Replace url with the URL of the page that the region leads to.
The NOHREF attribute indicates that the coordinates defined don't lead to a
URL. You should include this attribute in the last line of the map definition.
The browser evaluates regions based on the order they appeared in the map file. So,
if you have a region within a region, then the smaller region would have to appear
first in the map definition to be expressed, for example:
<MAP NAME="shapes">
</MAP>