[WordPress] 外掛分享: Toytown Map

首頁 › 外掛目錄 › Toytown Map
全新外掛
安裝啟用
—
尚無評分
24 天前
最後更新
—
問題解決
WordPress 6.5+ PHP 7.4+ v0.1.0 上架:2026-10-04

內容簡介

Toytown Map 將 OpenStreetMap 轉換為友好的 3D 玩具城鎮,讓每棟建築都變成小玩具,並提供多種主題皮膚選擇,讓使用者能夠輕鬆創建互動地圖。

【主要功能】
• 3D 玩具城鎮視覺化
• 多達 20 種主題皮膚選擇
• 支援區域大小自訂
• 地圖僅在滾動到視野時加載
• 簡單的區塊和短碼使用

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Toytown Map」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Toytown Map turns OpenStreetMap into a friendly 3D toy town: every building becomes a little toy with a roof and windows, landmarks like churches, pubs and schools get their own low-poly models, and parks, pitches and racecourses are drawn too.

Any place in the world. Search for a village or town, pick how big an area to show, and the map is built from OpenStreetMap in the visitor’s browser. No data files, no API keys.
20 skins: Day, Night, Sitcom, Pastel, Toybox, Voxel, Chunky, Retro handheld, Neon, Vintage, Ink sketch, Hand-drawn, Comic, Blueprint, Golden hour, Autumn, Winter, Christmas, Halloween and Shamrock.
A block and a shortcode. The block has a live preview; the shortcode works in any editor.
Light on your pages. Maps load only when they scroll into view, and page scrolling is never trapped: visitors use Ctrl/⌘ + scroll (or two fingers) to move the map.

It’s built on toytown-gl, an open-source MapLibre plugin, and its CC0 model kit.
Shortcode
[toytown lat="52.1655" lng="-8.8265" size="1.5" skin="sitcom" height="480"]

lat, lng: the centre (required).
size: the area shown, in km across (0.3 to 3.4; default 1.5).
skin: one of default, night, sitcom, pastel, toybox, voxel, chunky, retro, neon, vintage, sketch, handdrawn, comic, blueprint, golden, autumn, winter, christmas, halloween, shamrock.
height (px), zoom (13 to 19), pitch (tilt, 0 to 70), bearing (rotation).
data: optional URL of a data file made with npx @toytown/cli build-data, for towns bigger than the browser builds.

Map data
Map data © OpenStreetMap contributors, available under the Open Database Licence. The attribution is shown on every map.
External services
The maps are drawn in your visitors’ browsers, which contact these services directly:

OpenFreeMap (https://openfreemap.org), for the base map tiles. Sent: the map tiles in view. Terms.
VersaTiles (https://versatiles.org), for the map label fonts. Sent: font ranges for the labels in view.
Overpass API (https://overpass-api.de), for the buildings and places in the chosen area, from OpenStreetMap. Sent: the area’s coordinates. Responses are cached in the visitor’s browser for a week. Not used when a map has a data file. Overpass API.
Nominatim (https://nominatim.openstreetmap.org), in the block editor only, when an editor searches for a place. Sent: the search text. Usage policy, OSMF privacy policy.

Like any web request, these services see the visitor’s IP address. No cookies are set and nothing is sent to the plugin author.
Source code
The plugin’s own PHP, JavaScript and CSS are not minified. The bundled libraries in public/vendor/ are minified builds; their source is:

toytown-gl.umd.js: toytown-gl, https://github.com/bpowerie25/Toytown (packages/core). Rebuild it, and this whole plugin, with pnpm install && pnpm --filter toytown-gl build && pnpm --filter @toytown/wordpress zip (see packages/wordpress/README.md).
maplibre-gl*.mjs, maplibre-gl.css: MapLibre GL JS 6, https://github.com/maplibre/maplibre-gl-js (the unmodified dist/ files from the maplibre-gl npm package).

The 3D models in public/models/ are generated by assets/generator/generate_models.py in the same repository.
Licences
The plugin’s code is MIT. Bundled libraries: toytown-gl (MIT), three.js (MIT), MapLibre GL JS (BSD-3-Clause). The 3D models are CC0.

延伸相關外掛

文章
Filter
Mastodon