跳到内容

Japan Clickable Map

v1.1.0

plugear · 2026年8月10日 上架

Place an interactive, clickable SVG map of Japan's 47 prefectures with a shortcode or block. Per-prefecture links, colors and grouped regions.

正在使用
10+
评分
暂无
累计下载
437
最近更新
2026年11月20日
需要 WordPress 6.6+已测试到 7.2PHP 8.1+

贡献者

截图

A prefecture map on the front end. The 47 prefectures are grouped into Japan's eight standard regions, each with its own fill.
A prefecture map on the front end. The 47 prefectures are grouped into Japan's eight standard regions, each with its own fill.
Clicking a region opens a popover carrying its own heading, body text and links.
Clicking a region opens a popover carrying its own heading, body text and links.
The map editor. Prefectures are listed by region, and colors and links can be overridden one prefecture at a time.
The map editor. Prefectures are listed by region, and colors and links can be overridden one prefecture at a time.
Colors: a default fill plus a color per region, with your saved presets next to every picker.
Colors: a default fill plus a color per region, with your saved presets next to every picker.
The preview modal inside the editor, so you can check a map without leaving the edit screen.
The preview modal inside the editor, so you can check a map without leaving the edit screen.
Placing a map with the block. The block stores only the map ID and renders on the server.
Placing a map with the block. The block stores only the map ID and renders on the server.
Saved color presets, reusable across maps.
Saved color presets, reusable across maps.
A legend below the map. Here the prefectures are grouped into legend areas for delivery times, each with its own color; prefectures in no area share one row whose label you choose.
A legend below the map. Here the prefectures are grouped into legend areas for delivery times, each with its own color; prefectures in no area share one row whose label you choose.

Japan Clickable Map turns a plain map of Japan into a navigation element: an
interactive SVG map with 47 clickable prefectures. You build a map in the
WordPress admin — pick which prefectures to show, give them colors and link
targets per prefecture or region — and then place it in any post, page or
custom post type with a shortcode or a block.

The map is rendered as inline SVG on the server. There is no external map
service, no API key and no JavaScript library to load: the front end only ships
a small script when a region popover is actually used.

Building a map

  • Map range — show all 47 prefectures (full), or only the prefectures you
    pick (range). Any combination of prefectures is allowed.
  • Detail level — choose between low, low-smooth, mid and high outline
    accuracy, so you can trade file size for coastline detail. low-smooth keeps the
    simplified low outline but joins its points with curves for a softer coastline.
  • Insets — Okinawa, the Northern Territories and the Ogasawara Islands are
    placed at fixed positions inside the map frame instead of stretching it.
  • Grouping (full mode) — treat each prefecture as its own clickable area, or
    group prefectures into regions. Regions can follow Japan’s standard eight
    regions (Hokkaido, Tohoku, Kanto, Chubu, Kinki, Chugoku, Shikoku, Kyushu), or
    you can define your own grouping per map.
  • Region behavior — a region can link straight to a URL, or open a popover
    listing the destinations inside it (hover or click).
  • Colors — set a default fill for the map and override it per prefecture.
  • Links — set a link per prefecture or per region. A prefecture with no link
    is not clickable and does not change the cursor.
  • Link targets — enter a URL by hand, or search your site and pick a post,
    page, custom post type entry or taxonomy term, so links keep working when
    permalinks change.
  • Labels — prefecture and region names are drawn on the map and exposed to
    screen readers as aria-label. Any label can be overridden per prefecture.
  • Legend — show a legend of your areas below the map. With “By region” it
    lists the regions or your custom areas. In the other modes you define areas
    on the “Legend areas” tab, and each area also colors its prefectures and
    links them to the area’s URL.
  • Pins — mark places such as shops or offices with pins that carry an
    optional label and link. Place a pin by clicking the map in the preview, or
    type its coordinates. One pin image is shared by all maps: a default is
    bundled, and you can choose your own under Settings.
  • Color presets — save the palettes you use often and reuse them across
    maps.
  • Preview — check the finished map in a modal without leaving the editor.

Placing a map

Shortcode:

[plg_jcm_map id="123"]

Optional attributes: level (low / low-smooth / mid / high) to override
the detail level saved on the map, and class to add your own CSS class.

Or insert the Clickable Map of Japan block and choose which map to display. The
block stores only the map ID and renders on the server, so editing a map updates
every place it is embedded.

Prefecture level, without limits

Every option above is available here, and you can create as many prefecture maps
as you like. What the paid edition adds is a different level of detail:
maps at municipality level, where the clickable areas are cities, towns and
wards rather than prefectures, and where those areas can be grouped across
prefecture borders.

For developers

Themes and other plugins can change a map through 8 hooks. Every name starts
with plg_jcm_, and the paid edition uses the same names and arguments.

  • plg_jcm_loaded (action) — the plugin has loaded and set itself up.
  • plg_jcm_config (filter) — a map’s saved settings, before it is rendered on the site.
  • plg_jcm_allowed_levels (filter) — the detail levels a map may use.
  • plg_jcm_svg_file (filter) — the path of the base SVG map for a detail level.
  • plg_jcm_pref_path_attrs (filter) — the fill color, accessible name and link of one prefecture.
  • plg_jcm_svg_dom (action) — the finished SVG as a DOMDocument, just before it is output.
  • plg_jcm_allowed_html (filter) — the wp_kses allowlist for the map SVG.
  • plg_jcm_map_html (filter) — the final HTML of the shortcode or block.

If you add elements in plg_jcm_svg_dom, allow them in plg_jcm_allowed_html
too: anything that is not on the allowlist is removed from the output. Where a
hook passes $kind, it is always pref here; the paid edition also passes
muni for municipality maps. Documentation: https://plugear.net/docs/japan-clickable-map/en/

Map data

The bundled SVG maps in assets/svg/ are derived from the National Land
Numerical Information (Administrative Zones Data, N03)
published by the
Ministry of Land, Infrastructure, Transport and Tourism of Japan (data as of
1 January 2024).

  • Source: https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-v3_1.html
  • Terms: https://nlftp.mlit.go.jp/ksj/other/agreement_01.html — the Japanese
    Government Standard Terms of Use (version 2.0), which are compatible with
    CC BY 4.0. Modification, redistribution and commercial use are permitted as
    long as the source is credited.

Processing applied to the original data: administrative polygons dissolved into
prefecture outlines, reprojection to Web Mercator (EPSG:3857), Okinawa moved
into an inset, vertex simplification, conversion to SVG, and the addition of
identifying attributes. See assets/svg/japan/README.md for details.

If you display these maps, please credit the source somewhere visible on the
page (a footer or a caption is fine):

「国土数値情報(行政区域データ)」(国土交通省)
(https://nlftp.mlit.go.jp/ksj/gml/datalist/KsjTmplt-N03-v3_1.html) を加工して作成

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums