Skip to main content

Actions

In the Actions tab you choose what happens when the map loads and when the user clicks, touches, or hovers a Region, Marker, or Directory item.

Open Map Editor › Actions. Options are grouped by event. Several actions can be enabled at once (for example zoom + show popover).

When to use

GoalTypical actions
Deep-link to a region or markerAdd ID to URL + On map load: trigger click
Store locatorDirectory item click: zoom / show details or popover
Open an external pageGo to link (pick a URL field)
Drill down into another mapShow another map
Hover hintsRegion / Marker mouseover: Show tooltip

Customize HTML in Templates. Style popovers and details in CSS. Related tutorial: Regions and Markers as links.


On map load

Runs after the map has loaded.

OptionDescription
Load location only for post matching current page URLShown when the map uses WordPress posts. Loads the location for the post whose permalink slug is the last URL segment. Turn off Database › Settings › Load on start to avoid a double backend request on map load.
Trigger Region.click event (if URL contains Region ID)If the URL includes a Region ID (see Add Region ID to the URL), runs the Region click actions for that region.
Trigger Marker.click event (if URL contains DB Object ID)If the URL includes a Database Object ID, runs the Marker click actions for that object.

Region click

OptionDescription
Add Region ID to the URLUpdates the hash, e.g. example.com/my-map/#/m/r/USA. Opening that link can trigger Region click on load (enable On map load › Trigger Region.click).
Filter directory by RegionFilters the Directory to items related to the clicked Region.
Zoom to RegionZooms the map to the clicked Region. Zoom level: Auto or a fixed level.
Show details viewOpens the Details view. The Region is passed to the Region details view template.
Show popoverOpens a popover using the Region popover template. Prefer Settings › Popovers › Center map on popover and Settings › Scroll so the popover stays in view.
Go to linkNavigates to a URL from a Region field. Choose Field with URL and optionally Open link in a new tab.
Show another mapLoads another map using a Region field that stores the target map ID. Container ID: by default the new map replaces the current one; set a custom container ID to keep both maps.

If Show another map fails with a missing container error, see the Error Dictionary.


Region mouseover

OptionDescription
Show tooltipShows a tooltip on hover (desktop). Content comes from the Region tooltip template.

Marker mouseover

OptionDescription
Show tooltipShows a tooltip on hover. Content comes from the Database Object tooltip template.

Region touch

Touch devices often have no hover. Use this instead of (or in addition to) mouseover.

OptionDescription
Show tooltipOn touch, shows content via the Region popover template (UI label in admin: "Show tooltip").

Marker click

OptionDescription
Add DB Object ID to the URLUpdates the hash, e.g. example.com/my-map/#/m/db/124. Opening that link can trigger Marker click on load. If the object was not loaded because of pagination, MapSVG fetches it from the database.
Show details viewOpens Details. The parent Database Object is passed to the DB Object details view template.
Show popoverOpens a popover using the DB Object popover template.
Zoom to MarkerZooms to the marker. Zoom level: Auto or a fixed level.
Go to linkNavigates to a URL from a Database Object field. Optionally open in a new tab.

Marker touch

OptionDescription
Show popoverOn touch, shows the DB Object popover template.

Directory item click

Behavior depends on Directory › Data source (Regions or Database).

OptionDescription
Add Object or Region ID to the URLAdds the Region or Database Object ID to the URL, depending on the Directory source.
Show details viewOpens Details for the clicked directory item (template matches the Directory source).
Select associated Region(s)Highlights Region(s) linked to the clicked item.
Trigger click event for associated Region(s)Runs Region click actions for linked Region(s).
Trigger click event for associated MarkerRuns Marker click actions for the linked Marker.
Trigger show popover for associated RegionShows the Region popover. If several Regions are attached, only the first gets a popover.
Trigger show popover for associated MarkerShows the Marker popover.
Zoom to associated Region(s)Zooms to linked Region(s). Optional zoom level.
Zoom to associated MarkerZooms to the linked Marker. Optional zoom level.
Go to linkNavigates using a URL field from Region or Database Object fields. Optionally open in a new tab.
Show another mapSame as Region click: field with map ID + optional Container ID.

Directory item hover

OptionDescription
Center on MarkerWhile hovering a directory item, centers the map on the associated Marker.