Terminology
For many of the concepts and functionality described within the documentation, it will help to explain the basic terminology used:
- area - An area on an image map, specifically, defined by an
areatag (HTMLAreaElementExternal link leaves this site) in the HTML markup. - area group - One or more areas that are grouped together logically, each defined by an
areatag. Area groups can be manipulated as if they were a single area. Often when discussing functionality the documentation may useareaandarea groupinterchangeably. In most cases, functionality applies to anarea group, which can be one or more areas. If the distinction is important, it will be referenced asa specific area. - map key - A token used to identify an
areaorarea group. While you can use ImageMapster to manipulate things by selecting actualareaelements from your HTML, it is often more convenient to refer to anarea group. Themap keyrefers to an identifier that you provide via the mapKey option for eachareaand allows you to create groups (when you use the same identifier for multiple areas). If you don’t want to create any groups and don’t want to refer to areas other than via their HTML tags, you do not have to provide a map key. - primary key - An
areacan contain more than one key in the attribute identified bymapKey, separated by commas. The first one is theprimary keyand defines what areas are higlighted together when anareais clicked. However, you can add more keys to create other groupings, which can be activated using the set method. - select - When you select something, it becomes active until deselected. Selecting is like checking a box. It remains selected until deselected.
- highlight - A highlight, unlike a selection, is temporary, and can only apply to a single
areaat once. Usually something is highlighted when the user moves their mouse pointer over it, but a highlight can be set programatically as well with the highlight method. - static state - Areas may also be in a staticState which means that their selection state cannot be changed. A static state can either be
trueorfalse; whentrue, anareaappears selected, but can never be deselected. Static state does not affect selection state. When querying the state of a static statearea, even if it appears selected (because it’s static state istrue), it’s selection state will always befalse.