The NCSA Format


Map files written using the NCSA format contain six keywords: default, point, circle, oval, rect, and poly. When a user makes a selection, shapes are checked in the order they appear in the file. Lines beginning with # are comment lines, ignored by the server. The beginning of each line is checked for a keyword along with its appropriate syntax:

default URL
The default URL should be in the first line and must be set unless there are points defined.
point URL x,y
If no shape is selected, points override the default. The closest point, defined by its coordinates, is selected.
circle URL x1,y1 x2,y2
Circle is defined by its center point x1,y1 and a point x2,y2 on its edge.
rect URL x1,y1 x2,y2
Rectangle is defined by the coordinates of its top-left x1,y1 and bottom-right x2,y2 corners.
poly URL x1,y1 ... xn,yn
Polygon is defined by a list of at most 100 vertices, with its first and last connected.
Coordinates use the upper-left corner as the origin, increasing down and to the right.

A URL can be either a full URL (access method, host name, and path) or a partial URL. A partial URL must always begin with a slash, and refers to a URL on the local host.

Example

This clickable image is an example of an image-map that uses the NCSA format.

The file ncsa-shapes.ncsa-map specifies the configuration information for this image-map.

Back to Formats

Back to Image-Maps on CL-HTTP


Christopher R. Vincent -- Christopher_Vincent@nospam.alum.mit.edu
M.I.T. Computer Science & Artificial Intelligence Laboratory