Help:Image maps

__NORICHEDITOR__

The ImageMap extension to the MediaWiki software allows you to insert images with clickable links into articles in the wiki. With the ImageMap extension, you can make an entire image serve as a link to a different article or you can select multiple areas within that image to link to different articles. The ImageMap extension is a powerful and flexible tool, but because it is coded in HTML and defines regions via coordinates, many users may find it difficult to use at first. This guide will show you the easiest way to use the ImageMap extension to use an image to link to another article.

Steps

 * 1)  Upload your image to FamilySearch Wiki if you have not done so already.
 * 2)  Go to the page displaying the image and description (e.g., https://wiki.familysearch.org/en/Image:Oregon_flag.png), and then click on the link to the file just below image to bring you to the page showing the full URL to link to the image.
 * 3) * Your browser should now just show the image, but no descriptive information.
 * 4) * You should see a URL similar to this: https://wiki.familysearch.org/en/images/1/17/Oregon_flag.png
 * 5) * Copy this URL.
 * 6)  Open a new window or tab in your browser and navigate to the ImageMap Editor.
 * 7) * The ImageMap Editor is a tool that will help you to select the appropriate region(s) within your image for use as links to other pages.
 * 8) * Once you have selected your region(s), the ImageMap editor will also generate the correct code to define those region(s). This code can then be pasted into your article to make your image map work as intended.
 * 9)  Enter your URL into the field labeled URL under "Load from URL" and enter the image name in the field labeled "Name" (note: the image name is the text following the final / in the URL you copied). Be sure to include the file extension (e.g., .PNG, .JPG, .GIF) as well.
 * 10) Click "Load" to display your image in the ImageMap Editor. The image will display in a box labeled "Image" below the "Load Image" box.
 * 11) Define the region to be used as your link. Choose Rectangle, Circle, or Poly. Choose the area type that best matches the shape of the area you want to link.
 * 12) *Rectangle: Select the upper left corner with the left mouse button. Select the lower right corner with the right mouse button. The XY coordinates for the corners of your image will now be displayed in the boxes indicating "Left/Top" and "Right/Bottom". These coordinates can be manually adjusted.
 * 13) *Poly: Click for each point you want defined.
 * 14) *Circle: Select center of the circle with the left mouse button. Select the radius with the right mouse button.
 * 15) Fill in "link" and "title" in the "General" box.
 * 16) *In the link field, type the name of the page that you want the section to link to, the destination page.
 * 17) *In the title field, type the word or phrase that you want to appear when you hover your cursor over the area in the image map. If you leave the title field blank, it will display the name of the link by default.
 * 18)  Scroll down the page in the ImageMap Editor until you see the box labeled "Global Settings." If you would like to keep the default settings, you do not need to do anything with this box. By default, these settings will superimpose a blue circle with an "i" in it on the bottom left corner your image which provides a link to the image's information page (the rest of the image will link to the page you select).
 * 19) * If you do not want to display the information link, select "None."
 * 20) * If you would like to select a different location for the information link, choose one of the other locations.
 * 21)  Scroll down and copy the ImageMap extension code from the box directly below the "Global Settings" box. This is the code you will paste into a wiki page to create your image link.
 * 22) * The code begins with the text . Be sure you copy these and everything between.
 * 23) * The rest of the code defines your area:
 * 24) ** "rect 1 1 741 445" indicates a rectangle starting at pixel 1,1 (i.e., upper right) and going to pixel 741,445.
 * 25) ** The " " are the brackets that will surround the page the image will link to. This follows standard wiki markup.
 * 26) Open a new window or tab in your browser and edit the page you wish to place the ImageMap link in.

Example
In this example, you will take an image of the Oregon flag and make it so that when you click on the image, you are taken to the Oregon page.
 * 1) Go to https://wiki.familysearch.org/en/Image:Oregon_flag.png, and then click on the link to the file just below image to bring you to the page showing the full URL to link to the image.
 * 2) Copy the URL (https://wiki.familysearch.org/en/images/1/17/Oregon_flag.png)
 * 3) Go to ImageMap Editor and paste the URL in the URL field of the "Load from URL" box. Enter the full name of the image in the name box. In this example, the full name of the image is Oregon_flag.png.
 * 4) Click load
 * 5) The image will then load.
 * 6) Click Rectangle in the New Area box.
 * 7) In the link field of the General box, type Oregon.
 * 8) Next, you will set the clickable area that will link to the "Oregon" page. In the right upper corner of the image, click with the right mouse button. In the left lower corner of the image, click with the left mouse button.
 * 9) In the Global Settings box, click none.
 * 10) Paste your code in the appropriate location in the page. You should see something like this:

Save your page and test your link. If you followed the instructions for this code, you would see:

Tips

 * You can use the ImageMap extension and the ImageMap editor to define multiple regions within your image that link to different pages.
 * You can learn more about some advanced applications of the ImageMap extension at MediaWiki.
 * It's a good idea to get familiar with new tools by playing with them in the Sandbox before trying them out on full articles.

Sources and Citations

 * MediaWiki ImageMap Extension and documentation
 * ImageMap editor