🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

GravityExtra Image Map Setup Guide

Updated 11 min read WordPress Plugins Integrations A–Z
On this page
  1. What you need
  2. Install and activate
  3. Start from a demo map
  4. The map editor
  5. Background image
  6. Drawing tools
  7. Import an SVG
  8. Content of an area
  9. Actions on click
  10. Spots
  11. Layers and floors
  12. Styles per state
  13. Map settings
  14. Show a map on a page
  15. For visitors: keyboard, screen readers and phones
  16. Export, import and duplicate
  17. For developers
  18. License and updates
  19. Frequently asked questions
  20. Does it need Gravity Forms or another plugin?
  21. Can I use a JPG or PNG photo?
  22. My SVG imported as one big shape. Why?
  23. Will the map slow my pages down?
  24. Where does the map data come from, and may I use it commercially?

GravityExtra Image Map turns any picture or SVG drawing into an interactive map on your WordPress site. Draw areas on a floor plan, a product photo, a campus map or a world map, and visitors can hover or tap them to see a tooltip, open a popup with text, an image, a video and a button, jump to a link or switch to another floor. The plugin comes with ready world and US maps, a visual editor, a searchable list of places, zoom and pan, and an Image Map block. It is a standalone plugin: no Gravity Forms needed. This guide covers installing it, the editor, SVG import, content and actions, layers, styles, the front end, accessibility, import and export, and the questions people ask most.

What you need

You need WordPress 6.5 or newer and PHP 7.4 or newer. The plugin was tested on WordPress 7.1 with PHP 8.3 and on WordPress 6.9 with PHP 7.4, with a block theme and the default editor. It needs no other plugin. All of its scripts, styles, icons and demo maps are part of the plugin and are served from your own site; it loads nothing from another server. Its only outside connection is the license and update check with gravityextra.com, made in the WordPress admin.

Install and activate

  • Upload the plugin zip in Plugins → Add New → Upload Plugin and activate it.
  • Open Image Maps → Settings, enter your license key and click Activate License.
  • Open Image Maps → Demo maps to start from a ready map, or Image Maps → Add New Map to start from your own image.

Until the license is active, maps are not shown to visitors, and the editor shows a short message with a link to the settings page instead of the drawing tools. Editors and administrators see a small notice where a map would be, so a page never breaks silently. Your maps are kept; they appear again as soon as the license is active.

Start from a demo map

The Demo maps page has four maps you can create with one click. Each becomes a normal map that you can rename, restyle and change.

  • World countries: 176 countries as clickable shapes with tooltips, a searchable list and zoom. The shapes come from Natural Earth, which is in the public domain.
  • US states: the 50 states and the District of Columbia, with Alaska and Hawaii placed below the mainland. The shapes come from the US Census Bureau cartographic boundary files, also in the public domain.
  • Office floors: two floors with a layer switcher, rooms drawn as rectangles, a polygon and an oval, popups with a button, spots, and an area that switches to the other floor when it is clicked.
  • Product spots: a room drawing with pulsing spots, product popups with prices and buttons, a link action and a video popup.
The World countries demo map: 176 light blue countries, Brazil highlighted in dark blue with a tooltip that shows its name and text, zoom buttons in the corner and a searchable list of countries on the right
The world demo: hover a country for its tooltip, search or pick it from the list.

The map editor

Every map has its own screen under Image Maps. Give the map a title, then use the editor below it. The toolbar holds the drawing tools, duplicate, delete, undo, redo, the editor zoom and the Save map button. On the left you find the layers of the map, a search box and the list of areas on the current layer. In the middle is the canvas. On the right are four tabs: Area, Map, Layers and Import / Export.

The map editor with the US states map: drawing tools and Save map in the toolbar, the list of 51 states on the left, the map in the middle and the Area tab on the right with the title Texas, the list switch, the display choice and the content text
The visual editor: tools, the list of areas, the canvas and the settings of the selected area.

Background image

Open the Layers tab and click Choose next to Background image to pick a picture from the Media Library. When the map has no areas yet, the editor offers to use the image size as the map size, so areas line up with the picture at any screen width. You can also set the width and height yourself on the Map tab. The size is in map units, not pixels: the map always scales to the width of the page, and areas scale with it.

Drawing tools

  • Rectangle (key R): drag on the canvas.
  • Circle (key C): drag from the centre outwards.
  • Oval (key O): drag a box around it.
  • Polygon (key P): click to add points. Click the first point again, double-click or press Enter to finish; Escape cancels.
  • Spot (key S): click where the spot should be.
  • Select / move (key V): click an area to edit it, drag it to move it, drag the round handles to resize it or to move a polygon point. Shift and a click on a polygon point removes it.

With an area selected, the arrow keys move it one unit at a time, or ten with Shift. Delete removes it, Ctrl+D (Cmd+D on a Mac) duplicates it, and Ctrl+Z and Ctrl+Y undo and redo. The editor keeps the last 80 steps.

Import an SVG

Many maps start as an SVG drawing: a floor plan exported from a design tool, a seating chart, a region map. Open the Layers tab, choose the SVG file under Import an SVG, and every shape of the drawing becomes a clickable area on the current layer: paths, polygons, polylines, rectangles, circles and ovals. Each area is named after the shape’s title, label or id, so a shape with the id meeting_room_2 arrives as “Meeting room 2”. Shapes inside a named group get that group name, which is used to sort the list of places. Text in the drawing stays as a background so labels keep showing.

  • Shapes become clickable areas: switch it off to use the whole drawing as a background only.
  • Keep the colours of the drawing: each area keeps its own fill as its default colour; hover and active colours still come from the map.
  • Use the size of the drawing as the map size: the map takes the drawing’s viewBox.

The file is cleaned on your server before anything is kept. Scripts, event handlers, links, embedded images, style sheets, external references and anything else that is not a plain drawing are removed, so an imported drawing can only draw.

The Layers tab after an SVG import: a campus drawing whose labs, library, fountain and lawn became seven clickable areas listed on the left, with the import options and the message 7 areas imported
SVG import: every shape of the drawing becomes a clickable area named after its title or id.

Content of an area

Select an area and use the Area tab.

  • Title: shown at the top of the tooltip or popup, in the list of places and to screen readers.
  • Group: an optional heading that sorts the list, for example a region or a floor wing.
  • Show in the list of places: switch it off for decorative areas.
  • When clicked or hovered, show: a tooltip, a popup window, or nothing.
  • Text: the content, with the HTML you can use in a post (paragraphs, bold, links, lists).
  • Image and its alt text: picked from the Media Library.
  • Video link: a YouTube or Vimeo link, or a link to an MP4, WebM or OGG file. Videos play in popups and in the phone sheet. They are loaded only when the visitor opens that area, and YouTube videos use the privacy-enhanced player.
  • Button: a text and a link, for example “Book a visit” or “View product”, optionally in a new tab. E-mail and phone links work too.

Text is checked when you save: the HTML allowed in post content is kept, anything else is removed. That keeps a map safe even when several people edit it.

Actions on click

The Action section of an area decides what a click does besides showing the content.

  • Only show the content: the default.
  • Open a link: goes to a page on your site or elsewhere, optionally in a new tab. The tooltip still shows on hover.
  • Switch to a layer: for example, the stairs on the ground floor open the first floor.
  • Fire a JavaScript event: give it a name such as book-room. The map element then sends a gewpim:action event whose detail holds that name, the area id and its title, so a developer can open a booking form, track a click or filter a list.

Spots

Spots are markers placed on a point of the map. They keep their size on screen at every zoom level. Each spot can use one of twelve icons (pin, dot, circle, plus, info, star, heart, home, flag, shop, camera and a number badge with your own number or letter), a custom image from the Media Library, its own size and colour, and a pulse animation that draws the eye. The defaults for all spots are on the Map tab; any spot can change them. Visitors who ask their device for reduced motion do not see the pulse.

The Office floors demo on its First floor tab: rooms drawn as rectangles and an oval, a red flag spot for the fire exit and the list of rooms of that floor on the right
Floors as layers with a switcher; the list follows the floor.

Layers and floors

A map can have up to 20 layers, each with its own background and areas, for example the floors of a building, the levels of a car park or before and after views. Add, rename and reorder layers on the Layers tab. On the page, a layer switcher above the map lets visitors change layer; the list of places follows the layer, and a search finds areas on every layer. The shortcode and the block can start on any layer.

Styles per state

Each area has three looks: Default, Hover and focus (also used when the area has keyboard focus or its list item is hovered) and Active (the area whose content is open). Each look has a fill colour, a fill opacity, a border colour and a border width. Set them for the whole map on the Map tab, then change any of them for one area in its Style of this area section. Border widths stay the same on screen at every zoom level.

Map settings

  • Show tooltips on: hover (and tap on touch screens), or click and tap only.
  • Zoom and pan: zoom buttons, Ctrl and the mouse wheel, drag to move, pinch on phones, and the keyboard. Set the largest zoom, and whether the mouse wheel alone zooms.
  • List of places: on the left or right of the map, with or without a search box.
  • Layer switcher: shown when the map has two or more layers.
  • Phone layout: below a width you choose (640 px by default) the list moves under the map, and content opens in a sheet at the bottom of the screen.
  • Background colour and the largest width of the map on the page.

Show a map on a page

In the block editor, add the Image Map block and choose the map in the block settings. The block shows a live preview, supports wide and full width, and can start on a given layer and show or hide the list. Each map screen also shows a shortcode you can paste into any page, widget or page builder text element, for example [gravityextra_image_map id="12"], with the optional attributes layer (the id of the starting layer) and sidebar (1 or 0). Draft maps are shown only to people who can edit them.

For visitors: keyboard, screen readers and phones

Every clickable area and spot is a button with its title as its name, reachable with the Tab key and opened with Enter or the space bar. The tooltip is linked to the area so screen readers read it, the popup is a dialog that keeps the keyboard inside until it is closed and then gives focus back to the area, Escape closes what is open, the layer switcher is a tab list that works with the arrow keys, and search results and zoom changes are announced. On phones the list sits under the map, a tap opens the content in a bottom sheet with a close button, and the page never scrolls sideways.

Export, import and duplicate

Use Export JSON on the map screen or in the list of maps to download a map with all its layers, areas, content and styles. Image Maps → Import map adds a JSON file as a new draft map, so you can move maps between sites or keep a copy before big changes. Inside the editor, the Import / Export tab can also replace the current map with a JSON file; undo brings the old one back until you save. Duplicate in the list of maps makes a draft copy. Imported files are checked field by field, just like the editor.

For developers

The map element fires gewpim:ready, gewpim:over, gewpim:out, gewpim:click, gewpim:open, gewpim:close, gewpim:layer, gewpim:zoom and gewpim:action. window.GEWPIM.get( elementId ) returns an object with open( areaId ), close(), layer( layerId ), zoom( factor ), reset() and state(). In PHP, the filter gewpim_map_data receives the map right before it is printed (the result is checked again), and gewpim_edit_capability and gewpim_settings_capability change who can edit maps and who can manage the license.

License and updates

The license unlocks the editor and shows your maps on the site. Updates arrive in Dashboard → Updates like any plugin while the license is valid. Uninstalling the plugin removes its settings and license data and keeps your maps, so a new install finds them again.

Frequently asked questions

Does it need Gravity Forms or another plugin?

No. It is a standalone WordPress plugin.

Can I use a JPG or PNG photo?

Yes. Any image from the Media Library can be the background of a layer. SVG import is for drawings whose shapes you want as areas.

My SVG imported as one big shape. Why?

The drawing was probably flattened into a single path when it was exported. Export it again with the rooms or regions as separate shapes, ideally with ids or titles.

Will the map slow my pages down?

The map is printed by the server as an inline drawing, its script and style load only on pages that show a map, and videos load only when opened.

Where does the map data come from, and may I use it commercially?

The world shapes come from Natural Earth and the US shapes from the US Census Bureau; both are in the public domain. The licence details are in the plugin’s assets/demo/LICENSE-map-data.txt.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr