17.2. Using the image map editor

An image area is added as follows:

  1. Click the Rectangle, Circle or Polygon button to select the corresponding drawing tool.

  2. Draw a shape as you would do it in any vector graphics editor.

    Note that in the case of the Polygon tool, you'll have to right-click anywhere and select "Finish" in the contextual popup menu to close the polygon. More information in Section 17.2.1, “The toolbar of the image map editor”.

    Doing this adds an area to the Areas list found at the left of the image map editor. The newly added area is automatically selected. The Select tool is also automatically selected, that is, the current “drawing mode” is automatically abandoned.

  3. Optionally adjust the position and size of the selected shape as you would do it in any vector graphics editor.

  4. Optionally specify a link target for the new added area. This is done by clicking button Edit which displays the The "Edit image map area" dialog box. More information in Section 17.2.2, “Specifying the link target and optionally the link text of selected area”.

[Important]The order of areas in the Areas list is significant
  • In case some areas overlap, it's important to know that:

    • areas are drawn in reverse order, from last area to first one;

    • when used as hyperlinks, areas are considered in order, from first one to last one.

      Example: in the case of the above figure, the first area is a transparent square found in the middle of the second area, a larger red square.

      First area, the transparent square, is a “dead area”, that is, not an hyperlink. Second area, the red square, is a “hot area”, an hyperlink pointing to red.html.

      Because the “dead area” is found before its enclosing “hot area” in the Areas list, clicking in the middle of the red square has no effect, while clicking in any red location will cause the red.html link to be followed.

      Switching the position of these dead and hot areas in the Areas list[35] would have to effect of making the dead area completely useless.

  • The "Set Default" button may be used to specify the hyperlink, if any, associated to any part of the image which is not included in the areas found in the Areas list. This default area —the entire image— is always added at the very end of the Areas list. It does not make sense to add it elsewhere.

17.2.1. The toolbar of the image map editor

1

Select, move or resize area.

2

Add rectangular area.

Click on the first corner of the rectangle and drag to specify the opposite corner of the rectangle.

3

Add circular area.

Click on the center of the circle and drag to specify the radius of the circle.

DocBook imageobjectco element only supports rectangular areas. Circular and polygonal areas are not supported.

4

Add polygonal area.

Drag to draw at least two sides of the polygon then right-click anywhere and select "Finish" in the contextual popup menu to close the polygon.

DocBook imageobjectco element only supports rectangular areas. Circular and polygonal areas are not supported.

5

Displays the Zoom menu.

6

Displays and also allows to adjust the current zoom level.

The zoom level may also be changed by using the mouse wheel while pressing the Ctrl key (Cmd key on the Mac).

7

Displays the "Create and use an annotated variant of image file" menu. More information about this facility in Section 17.3, “Creating and using an annotated variant of image file”.

8

The Cancel button.

9

The Help button.

10

The OK button.

17.2.2. Specifying the link target and optionally the link text of selected area

The "Edit image map area" dialog box is displayed by clicking the Edit or "Set Default" buttons.

Figure 9.32. The "Edit image map area" dialog box
The "Edit image map area" dialog box
  • The "Link target" field contains the target of the link. This link target may be a destination which is internal to the document being edited or external to it, typically a Web page.

    Click the "Choose link target" button to specify an internal link. This button displays the same dialog box as the "Set Link Target" entry found in the contextual popup menu after right-clicking an hypertext element (e.g. XHTML a).

    Drag a link location from a Web browser and drop it into the "Link target" field to specify an external link.

    DocBook 4 imageobjectco element only supports internal links.

    DocBook has a facility —DocBookLink callouts in XMLmind XML Editor - DocBook Support— allowing to automatically link areas and items found in a calloutlist element. With this facility, there is no need to use the "Edit image map area" dialog box.

  • The "Link text" field contains an optional description of the link target. This description is ignored unless a link target has been specified.

    DocBook 4 imageobjectco element does not support link text.



[35] Areas list items may be moved by using drag and drop.