WordPress plugin for creating and embedding interactive maps using the @draadnl/map-components web component library.
- WordPress 6.0+
- PHP 8.0+
- Node.js 18+ (for building assets)
- Map custom post type — manage maps as first-class content objects.
- Gutenberg block — embed maps anywhere via the block editor.
- Den Haag theme — built-in styling aligned with the Gemeente Den Haag design system.
- Datasource support — connect maps to GeoJSON, WMS, and WFS data sources.
- Upload the plugin directory to
wp-content/plugins/. - Activate via the WordPress admin.
- Create maps under Maps in the admin menu.
- Add the Draad Map block to any page or post.
Install dependencies:
npm installBuild assets (also generates the scoped Den Haag token CSS):
npm run buildStart development mode with file watching:
npm run startThe plugin uses @gemeente-denhaag/design-tokens for colours, typography, spacing, and border radii. At build time, scripts/wrap-tokens.js rewrites the package's :root token block to .wp-block-draad-map, scoping all --denhaag-* custom properties to the block so they don't affect the surrounding page.
See CHANGELOG.md.