ImageMapEdit is a means to create ImageMaps rapidly and easily.
- 1 Who is this HowTo for?
- 2 What is an Image Map?
- 3 Setup
- 4 Editing an ImageMap
- 4.1 Opening the editor
- 4.2 Figure: The Editor
- 4.3 Deciding where to place hot zones
- 4.4 Create new area (draw a hot zone)
- 4.5 Edit Area
- 4.6 Use the created ImageMap on a page
- 4.7 Other Functionality
- 5 Q&A
- 6 See Also
Who is this HowTo for?
This HowTo might be useful to you, if...
- you want to know what an imagemap is.
- you are already somewhat familiar with MediaWiki, and would now like to use ImageMaps.
- you would like to set up ImageMapEdit.
- you would like to learn how to create and edit ImageMaps
This HowTo assumes you have already uploaded the image to the wiki, and are looking at the file description page for that image.
What is an Image Map?
ImageMaps are used when you want to make links out of multiple parts of a single image. The idea is to indicate "hot zones" on the image, which are mouse-clickable.
- There are several image maps on this page.
Why do I want one?
- If you have a picture of a control panel with buttons, you can actually make the buttons pressable by using an imagemap. This might be useful for a printer manual, for instance. Clicking on a button might link to a page in the manual; or it might link to a new picture, showing the consequences of pressing the button; or it might do both!
- If you have a schematic, you can make the diverse edges (lines) and nodes (boxes) in the schematic clickable. You could use this to add detailed descriptions to steps in a process.
- In blueprints, you could allow access to more detailed subcomponents in the blueprint in this manner.
- If you have a photograph of a group of people, you could allow the user to click through to information about each person.
- In a photograph of a machine or a set of components, you could providelinks to blueprints, detail photos of each component, descriptions, specifications, etc.
- You could take photos of a number of rooms in a building, and make doors in each room clickable. When one of the doors is clicked, you could "move" the user to the next room. This can be used to make guided tours.
- There are many applications of imagemaps. Since you can use them with any picture, the system is very flexible. Use your imagination!
Putting an ImageMaps on a wiki is a bit tricky and takes a bit of work. ImageMapeEdit automates and simplifies a large part of the process.
Add the following to your monobook.js or vector.js :
- Wikipedia (en), Commons
- Wikipedia (de)
Now, when you view images, you will have an ImageMapEdit button, which gives you access to the user interface.
Editing an ImageMap
This part of the Howto assumes you have already uploaded the image to the wiki, and are looking at the file description page for that image. See Uploading_files for details (We will use the wikicode generated by ImageMapEdit to replace the wikicode in that document).
Opening the editor
(These images contained proprietary data. I'll make new ones with with a CC image this weekend. )
When viewing an image on the images page, (our example: Image:PRO_process.jpg), a new link is available, right under the image. Click on this link, and an imagemap editor will appear.
Figure: The Editor
(This image contained proprietary data. I'll make new ones with with a CC image this weekend. )
Error: Image is invalid or non-existent.
Depicted:The ImageMap for the page Pro_processes is taking shape in ImageMapEdit. This image is itself an ImageMap. Mouse over and/or click on parts of the editor in the image for more information.
Deciding where to place hot zones
With ImageMaps, your Browser can't "see" the underlying image, and relies entirely on the hot zone information you enter. In fact, in theory, you could put any shape of hot zone anywhere on the image, though this might not be particularly useful.
More usefully, typically there are fairly obvious areas of the image which should be clickable. For instance, boxes in a schema, drawings of buttons, people, etc. Sometimes it can be useful to tailor an image to make it more obvious where people are supposed to click.
Create new area (draw a hot zone)
In the ImageMapEdit box, click on the shape you want for your (next) area (hot zone). Then, proceed as follows for that shape.
(Incidentally, the image to the right is an imagemap, click on it to jump directly to the relevant topic)
In the image, click your left mouse button in the top left corner of the rectangle you would like to create. (You may not see anything happen yet). Next, click the right mouse button in the bottom right corner of the image.
In the image, click your left mouse button in the center of the circle you would like to create. (You may not see anything happen yet). Next, click the right mouse button somewhere on the radius of the circle.
In the image, click your left mouse button on the first point of the polygon. (You may not see anything happen yet). Now, continue to click the left mouse button on each corner of the polygon, until the polygon is complete
Once you have drawn your hot zone (area), you need to specify what the hot zone links to.
- Link target: Specifies which wiki-page the user should go to, when they click on this hot zone (area).
- Link Title (Optional): Optionally, you can provide a mouse-over text for the hot zone. By default, if you don't provide a specific mouse-over text, the Link target will appear in the mouse-over text instead.
The other options tweak the hot zone, or allow you to remove it from the ImageMap.
Use the created ImageMap on a page
Finally, we are done creating our imagemap. Imagemaps don't exist in a vacuum, they need to be placed on a page. You typically place an ImageMap in a similar way to placing an Image. The ImageMapEdit tool has created the wikicode for us, so all we need to do is copy the code out of the Generated Code box, and paste it to the relevant page.
Note that in this example, some of the links weren't filled in yet. (note the empty [] behind some of the items.) Obviously, you want to fill out all the links before posting your ImageMap.
- you can provide a description for the image (This is only used as alt-text).
- You can place the "" information link in a different corner of the image, or leave it out altogether.
Import areas from wikicode
If you have an existing imagemap that you would like to edit, you will need to be able to access it somehow. To get the ImageMap (back) into the ImageMapEdit:
- click on
Show text box >
- paste the wikicode for the ImageMap into the box.
Q:My wikicode vanished, where did it go?
Say you have created an Imagemap one day, save it to the page, and go away. A little while later, you notice that you forgot a box, or you have updated the image, or at any rate, you want to revisit the imagemap
However, when you open ImageMapEdit, there's no code! Where did it go?
Answer: ImageMapeEdit is not fully integrated into the wiki. It only generates and reads wikicode.
- Go to the page where you put the ImageMap, and click edit.
- Select and copy the ImageMap code
- Then import that code back into ImageMapEdit. See: #Import areas from wikicode
Q:Can I still resize my image on the page?
In the imagemap code, just add the size you would like in pixels, just like you would do for an ordinary image; for instance:
Q:I Resized my image on the page, do I need to redraw my imagemap now?
Say you resize the image using the answer provided above, do you need to redraw the ImageMap to fit? Answer: No, fortunately. The ImageMap gets scaled by the same amount as the image, and remains usable as-is.