Copyright 1994 by Thomas Boutell. THIS IS NOT PUBLIC DOMAIN SOFTWARE. Commercial users must pay for it to continue using it after 30 days. You need not register again when new versions are released. Please remit $25 to:
Thomas Boutell P.O. Box 20837 Seattle, WA 98102 USANonprofit and educational users are required to send me a postcard!
CERN support! Version 1.1 has complete support for both CERN and NCSA imagemap formats. Mapedit can now automatically recognize either format during loading, and you can save as either format (note that this allows you to convert from one to the other). You can use resources to set CERN to be the default.
Many small fixes and enhancements.
The Imakefile should now be more broadly compatible, particularly
with SunOS 4.1.3.
The crash when clicking the left mouse button at inappropriate
times has been fixed.
The URL window no longer pops up when the middle mouse button
is used too early in drawing a polygon (<3 points).
mapedit is a WYSIWYG (What You See Is What You Get) editor for
imagemap files.
Imagemap files are a feature of both NCSA and CERN
httpd servers; they allow you to turn a GIF into a clickable map
by designating polygons, circles and rectangles within the GIF
and specifying a URL for each to link to.
Unfortunately, creating good image maps by hand is a lot of
work, because the points must be located using an editor not
explicitly designed for the purpose.
mapedit allows you to load your GIF image into a scrollable, resizable
window and then draw polygons, circles and rectangles on
top of it, specifying a URL for each. It also allows you to
go back and delete these "hot spots", set a default URL
for clicks outside of the "hot" areas, and so on. In addition,
it allows you to associate comments of arbitrary length with
each object.
To use mapedit, you will need the following:
You can get an attractive 3D look using the alternative
"Xaw3d" widgets, which provide a Motif-like appearance.
mapedit works fine with or without Xaw3d. To use Xaw3d
instead, change "-lXaw" to "-lXaw3d" in the Makefile that
is produced after you run xmkmf (see the section on building
mapedit). (Of course, you must get and install Xaw3d first!)
You can
fetch mapedit as a compressed tar file via this link
, Or you can FTP it by hand from isis.cshl.org, in the
subdirectory pub/mapedit.
In order to build mapedit, first untar the mapedit.tar file with the
following commands:
cd to this directory and examine the Imakefile, which you may need
to change slightly. Specifically, if your default C compiler
(the one that executes when you type "cc") does not accept
ANSI standard C, you will need to add a line specifying your
ANSI C compiler instead. For instance:
Now, type "xmkmf". If all goes well, you will now have a Makefile.
If this doesn't work, find out how to run Imake on your system
from your system's documentation.
Finally, type "make". This will compile and link mapedit.
If you get compilation errors, PLEASE verify that you have the
required tools listed above, especially ANSI C and X11R5. If you still
have problems, feel free to contact me.
The initial mapedit screen has a File menu at
the top left and a palette of toggle buttons on the row
beneath it. Initially the palette is disabled, since you have
not yet opened an image and a map.
Using the mouse, pull down the File menu and
select Open/Create Map.... A dialog box will
appear, probably in the upper left corner, depending on your
window manager.
In this dialog box you should enter the filename you would like
to give to your map, which need not already exist, and the
filename of a .gif image the map will be of, which
must exist. (mapedit is not a paint program. To create
your own GIFs, try David Koblas' xpaint; use archie to locate
a copy near you.)
Type in a map filename, such as "test.map", and also enter
the location of a GIF image for which you want to create a map.
(Give paths in the file system, of course, not URLs!) The
characters you type will appear in the field in which
you have placed the mouse pointer.
Also set the Style menu to the appropriate
style for your server (CERN or NCSA). NOTE:
you can change the default by placing the following
line in your .Xdefaults file:
Press RETURN or click on OK when you have
entered the filenames.
If the map file does not already exist, you will be asked if you
want to create it. Click on OK to continue. If
the map does exist, mapedit will automatically determine the
correct server type regardless of the Style
menu setting.
mapedit will now load your GIF image into memory. This will
take a few moments, depending on the size of the image.
When the image has been loaded, it will appear in the main
mapedit window, which should expand or shrink to suit the image.
If the image is large, scrollbars for horizontal and vertical
movement may appear.
You can navigate the image using the scrollbars. If you are using
vanilla Athena widgets, you will recognize them as the same
type you see in your xterms. If you are using Xaw3d, they will
be considerably more Motif-like.
Click on Poly to begin drawing a polygonal
hot spot. Now click the left mouse button at some
point on the edge of an area of interest in the image.
Move the mouse pointer to another point on the edge of the
area of interest, tracing its outline. Note that a "rubber-band"
line follows you from the point of the initial click.
Click again at this second point. Continue clicking points until
you have outlined all but the final connection back to the first
point. (You do not need to hold down the mouse button.)
(Note that if you don't like the way your polygon is turning out,
you can click the right mouse button to
cancel it; then start over with the left mouse button.)
To complete the polygon, click the middle
mouse button.
Another window will pop up, prompting you for the URL that
this polygon should link to. If you don't yet know the
URL, type in a name that is meaningful to you so you will
be able to recognize it later.
Also add any comments you wish in the comments window.
Click on OK or press RETURN to continue.
(The RETURN key only has
this effect in the URL window, since multiple-line
comments are allowed in the comments window.)
The polygon will now be traced in solid white,
and a final side between the last point and the first point
will be automatically added.
Now select Rect from the palette. Click
the left mouse button in one corner of a
rectangular region of interest in the image. Now move the
mouse pointer to the opposite corner, tracing out a
rectangle. (You do not need to hold down the mouse button.)
Click the middle mouse button to accept the rectangle, and
enter a URL for it as you did for the polygon. (Just as for
polygons, the right mouse button can be used
to cancel the rectangle while you are tracing it out.)
Now select Circle from the palette. Circles
work just like rectangles, except that the left mouse click
positions the center of the circle, and you can then
move the mouse pointer to any point on the edge of the desired
circle and click the middle mouse button to accept it. As
before, the right button cancels.
Important note: when hot spots overlap, the oldest
gets the click. This is important because this is how the
actual NCSA imagemap program will behave when your users click
on your map in practice.
NOTE: When you delete a hot spot (object),
comments associated with that hot spot are also deleted.
You may also, on the other hand, want to get rid of the
default URL completely. Once you have set a default URL,
a Delete button will appear in the
Edit Default URL window. Click this button
to remove the default URL.
Note: The testing tool does not indicate when the
default URL would be used. It was felt that not popping up
anything indicates clearly that the click is not in any hot spot,
and displaying the default URL might be misleading.
If a problem is encountered while writing this file (if you entered
a bad path when you first created the map, for instance),
use the Save As file menu option to
enter a new name for the map file.
However, mapedit will also silently preserve any comments placed
at the very end of the imagemap file, and will not delete
these comments under any circumstances.
What's new in version 1.0.1
A stabilizing release:
What is mapedit?
What else do I need to use mapedit?
How do I get mapedit?
How do I build mapedit?
uncompress mapedit1.1.2.tar.Z
tar -xf mapedit1.1.2.tar
This will create the directory "mapedit1.1.2" beneath the current
directory.
CC=gcc
If you have gcc, the freely available ANSI C compiler.
How do I get started editing an image map?
To start the program, just type "mapedit" (you may need to move
the mapedit binary to a directory somewhere on your path first).
Mapedit*cern: True
This change makes CERN the default. If you do not set this
resource, NCSA is the default.
How come my GIF is being dithered (sometimes)?
If you have a black and white screen, the answer is obvious: mapedit
is using black and white dots to approximate shades of gray. If
you have a color screen and see color dithering or a black and
white display, this is because there are too many colors already
in use on your screen and the image also calls for many colors.
In this case, mapedit does the best it can with the remaining
colors. Your GIF image is not actually changed.
If you find this behavior annoying on your 8-bit color display,
try reducing the number of colors in your image using the
"save with reduced color" feature of xv, the well-known
image viewer by John Bradley. xv's dithering is much
more sophisticated than mapedit's. (As a rule of thumb, images that
have enough colors to force mapedit to dither them will often
prove frustrating for Mosaic users to view as inline images,
especially when there are several on a page.)
How do I make "hot spots"?
Image maps consist of areas that have been designated as
"hot spots" which users can click on to fetch particular
URLs. Mapedit allows you to draw these graphically on the
screen.
How do I test my hot spots?
Click on Test in the palette. Now click
at various points in the image. When you click in a
hot spot, such as a polygon, rectangle or circle you have
designated, the URL window will pop up, showing the
URL assocated with that hot spot. Also, the region within
the hot spot will be displayed in reverse video.
How do I go back and edit URLs and comments?
Often you will not know the final URL for each hot spot
at first, or you will want to change it. You can do so
by selecting Test as described above
and clicking in the hot spot in question, editing the URL
that appears, and then clicking on OK
or pressing RETURN. You can also edit in the comments
window at this time. (The RETURN key does not dismiss
the popup while in the comments window; click on
the OK button instead.)
How do I delete unwanted hot spots?
Select Delete from the palette. The deletion
tool is identical to the testing tool in every respect; you
can use it to select hot spots and edit URLs, for instance.
But in addition, note that a Delete button
appears in the URL window when you select a hot spot. By clicking
this button, you can remove that hot spot from the map.
You can also use the middle mouse button to remove the
selected hot spot.
How do I set a default URL?
There is one more component in an imagemap file: a default URL
to be loaded if the click is not in any region. To set a
default URL, pull down the file menu and select
Edit Default URL.... Enter
a default URL in the window that appears, and click
on OK or press RETURN to accept it.
How do I save my work?
Pull down the file menu and select Save.
mapedit will write your map to the file you specified
when you opened it.
Can I convert from NCSA to CERN or vice versa?
Yes. Use the Save As file menu option and
change the setting of the Style menu that appears
in the Save As dialog box, then click OK to save
your map in the new format. That's all there is to it!
Can I edit my own imagemap files?
Yes! mapedit can read existing imagemap files without
difficulty. In addition, mapedit now preserves comments
in your imagemap file (as of version 1.1)! However,
keep in mind that when you delete a hot spot, comments
associated with it are also deleted. Also note that
comments are associated with the object that
follows them.
If you have problems
If you have any difficulties with mapedit, feel free to contact
the author,
Thomas Boutell (boutell@netcom.com). PLEASE verify that you have the
required tools first (X11R5, the Athena widgets, and an ANSI C compiler).