Charts · Gutenberg

World Map block for WordPress

Interactive SVG world map with country highlighting, data values, tooltips and a legend. Perfect for global presence, customer distribution, and sales territory sections.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Interactive SVG world map with country highlighting, data values, tooltips and a legend. Perfect for global presence, customer distribution, and sales territory sections.

Inspector panels on this block: Countries, Display, Map Style, Tooltip Style, Country List Style, Colours, Appearance. Those titles come from index.js, not from a shared template.

Behavior controls: “Color mode” options: Gradient by value, Uniform fill, Per-country custom color; “Projection” options: Natural Earth, Mercator, Equirectangular, Robinson.

Where to find it

Gutenberg inserter → Charts → search “World Map” (block name `blockenberg/world-map` in block.json). Style it in the sidebar after insert.

How to use World Map block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “World Map”, insert it. Category: Charts.
  3. Configure inspector controls that exist on this block. Open Countries. Set “Country name”, “Code (ISO)”, “Value / Count”, “Link URL”.
  4. Check the published page. The view script reads HTML data attributes: data-countries, data-opts. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Country nameText field in the inspector.
Code (ISO)Text field in the inspector.
Value / CountText field in the inspector.
Link URLText field in the inspector.
Show titleOn/off toggle in the inspector. On by default. Saved as `showTitle`.
Display — TitleText field in the inspector. block.json default: Global Presence. Saved as `title`.
Show subtitleOn/off toggle in the inspector. On by default. Saved as `showSubtitle`.
SubtitleText field in the inspector. block.json default: Serving customers across 10+ countries worldwide.. Saved as `subtitle`.
Show legendOn/off toggle in the inspector. On by default. Saved as `showLegend`.
Legend titleText field in the inspector. block.json default: Customers. Saved as `legendTitle`.
Show tooltips on hoverOn/off toggle in the inspector. On by default. Saved as `showTooltips`.
Show country list below mapOn/off toggle in the inspector. On by default. Saved as `showCountryList`.
Map height (px)Numeric range control in the inspector. Range 200–800. block.json default: 480. Saved as `mapHeight`.
Color modeSelect control; the chosen value is saved on the block. Options: Gradient by value; Uniform fill; Per-country custom color. block.json default: gradient. Saved as `colorMode`.
ProjectionSelect control; the chosen value is saved on the block. Options: Natural Earth; Mercator; Equirectangular; Robinson. block.json default: NaturalEarth1. Saved as `projection`.
Card radius (px)Numeric range control in the inspector. Range 0–40. block.json default: 16. Saved as `cardRadius`.
Padding top (px)Numeric range control in the inspector. Range 0–200. block.json default: 60. Saved as `paddingTop`.
Padding bottom (px)Numeric range control in the inspector. Range 0–200. block.json default: 60. Saved as `paddingBottom`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the World Map block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “World Map”. It sits under Charts. After insert, open Countries and set “Country name”, “Code (ISO)”, “Value / Count”, “Link URL”.

What makes World Map different from other Blockenberg blocks?

Interactive SVG world map with country highlighting, data values, tooltips and a legend. Perfect for global presence, customer distribution, and sales territory sections. Inspector labels on this block include “Country name”, “Code (ISO)”, “Value / Count”, “Link URL”.

Is the World Map Gutenberg block free?

Yes. World Map ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style World Map to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Countries, Display, Map Style, Tooltip Style).

Related charts blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert World Map from the Gutenberg inserter.

Get Blockenberg