| htmlImageMap encapsulates the <MAP></MAP> tags, and is used to define information about active areas within an image. An image map divides a graphic image into multiple areas, each one referencing a different URL. When a user clicks on a specific area in the image, the web browser will use the image map to determine which URL should will be loaded and displayed.
|
|
|
| There are two kinds of image maps: server-side and client-side. Server-side image maps use mapping information stored in a file residing on the server.
|
|
|
| Client-side image maps use mapping information (the image map) stored in the HTML document containing the image. An image map may contain one or more htmlArea objects, each describing a different area in the image and the URL it references. htmlArea objects are added to htmlImageMap objects using the Add() method or << insertion operator.
|
|
|
| htmlImageMap objects may be inserted anywhere within a document. You must associate images with image maps by name using the htmlImage::UseMap() method. Alternatively, you may bypass use of the UseMap() method by adding htmlImageMap objects to an htmlImage object directly via the << insertion operator or the Add() method. In such cases, you do not need to name the image map nor do you have to explicitly add it to the page in which the image appears.
|
|
|
| To use an image map, create an image object using htmlImage. The htmlImage::UseMap() method is used to specify the image map:
|
| 1) as a location and/or name of a MAP tag in a document, or
|
| 2) as a name of an htmlImageMap object
|
| 3) as an htmlImageMap object
|
|
|
| |