Image map: Difference between revisions

Content deleted Content added
This page is almost certainly not what people searching in mainspace are looking for
Creation and use: rm examplefarm
 
(5 intermediate revisions by 3 users not shown)
Line 1:
{{Short description|Method of adding links to parts of an image}}
{{More citations needed|date=September 2023}}
In [[HTML]] and [[XHTML]], an '''image map''' is a list of coordinates relating to a specific [[image]], created in order to [[hyperlink]] areas of thean [[Digital image|image]] to different destinations (as opposed to a normal image link, in which the entire area of the image links to a single destination). For example, a map of the world may have each country hyperlinked to further information about that country. The intention of an '''image map''' is to provide an easy way of linking various parts of an image without dividing the image into separate image files.
 
==Server-side==
'''Server-side image maps''' were first supported in [[Mosaic (web browser)]] version 1.1.<ref>{{cite web|url=http://1997.webhistory.org/www.lists/www-talk.1993q2/0343.html|title=IMG extension for Mosaic 1.1}}</ref> '''Server-side image maps''' enable the [[web browser]] to send positional information to the server about where the user clicks within an image. This allows the server to make pixel-by-pixel decisions about what content to return in response (possible methods are to use image mask layers, database queries, or configuration files on the server).
 
The [[HTML]] code for this type of '''server-side image map''' requires the <code><img></code> tag to be inside an anchor tag <code><a>...</a></code> and the <code><img></code> must include the <code>ismap</code> attribute.
<syntaxhighlight lang="html">
<a href="/imagemapper"><img src="image.png" ismap /></a>
Line 38:
 
===CSS===
A more modernrecent approach is to overlay links on an image using [[CSS]] absolute positioning; however, this only supports rectangular clickable areas. This CSS technique may be suitable for making an image map work properly on [[iPhones]], which can fail to rescale pure HTML image maps correctly.
 
==Creation and use==
Line 64:
It is possible to create client-side image maps by hand using a text editor, but doing so requires web designers to know how to code HTML as well as how to enumerate the coordinates of the areas they wish to place over the image. As a result, most image maps coded by hand are simple polygons.
 
Because creating image maps in a text editor requires much time and effort, many applications have been designed to allow web designers to create image maps quickly and easily, much as they would create shapes in a [[vector graphics editor]]. Examples of these applications are Adobe's [[Dreamweaver]] or [[KImageMapEditor]] (for [[KDE]]), and the imagemap plugin found in [[GIMP]]. The free and open-source office suite [[LibreOffice]] also includes a dedicated ImageMap editor.<ref>{{cite web |title=LibreOffice ImageMap editor help |url=https://help.libreoffice.org/7.5/en-US/text/shared/guide/imagemap.html}}</ref>
 
Image maps which do not make their clickable areas obvious risk subjecting the user to [[mystery meat navigation]]. Even when they do, where they lead may not be obvious. This can be partially remedied with rollover effects.<ref>{{cite book