Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

imio.map.wallonia

A map of Wallonia for Plone 6 Classic UI, shipped as a patternslib pattern: pat-wallonia-map.

The pattern shows a Leaflet map of Wallonia. The page gives lists of links. The map shows each link on its area: for example, a link named Namur goes on the municipality of Namur.

The add-on knows nothing about the content of the site. It ships the map, the borders and the pattern. The page that uses the pattern gives the links.

Usage

Install the add-on (imio.map.wallonia:default profile), then add the pattern to a template:

<div class="pat-wallonia-map">
  <ul data-layer="municipalities">
    <li><a href="https://example.org/namur">Namur</a></li>
    <li><a href="https://example.org/liege">Liège</a></li>
  </ul>
</div>

Two words are used in this documentation:

  • A layer is one kind of territory. The only layer is municipalities.
  • An area is one shape in a layer: one municipality.

The tiles-url and attribution options are optional. Use the JSON notation: it is safe for any URL.

<div class="pat-wallonia-map"
     data-pat-wallonia-map='{"tiles-url": "https://tiles.example.org/{z}/{x}/{y}.png", "attribution": "© Example"}'>
  ...
</div>

The default basemap is the CARTO light basemap, with an OpenStreetMap and NGI-IGN attribution. See the pattern documentation.

Requirements on the page:

  • Each link is in an element that has a data-layer attribute. The attribute gives the name of the layer.
  • The text of the link is the name of the area. For the municipalities layer, it is the French name of the municipality: Liège, not Luik.
  • The browser can reach the tile server.

A link with no layer, with an unknown layer or with an unknown name is not shown on the map. The pattern logs a warning in the browser console.

Without JavaScript, the lists of links stay visible.

The pattern brings its own stylesheet. It needs no icon font.

To try the map on a site where the add-on is installed, open @@walloniamap-demo.

Data

The data files ship as is in the bundle:

  • resources/pat-wallonia-map/layers/municipalities.json: the borders of the 261 municipalities of the Walloon Region. It is the opendatasoft georef-belgium-municipality dataset (year 2025), limited to the Walloon Region. The file is about 10 MB.
  • resources/pat-wallonia-map/wallonia-boundaries.json: the border of Wallonia.

The browser downloads these files from the Plone site, not from a third party. If borders change, for example after a merge of municipalities, a new release of the add-on brings the new files.

Why Module Federation

The plone bundle (mockup) is a webpack Module Federation host. When the DOM is ready, it finds each window.__patternslib_mf__* global, initialises that remote (this runs our registry.register(...)), and then scans the DOM for pat-* classes. The packages in the dependencies of package.json, and those of patternslib and mockup, become shared singletons: there is one pattern registry and one jQuery for all the remotes on the page.

This add-on is such a remote. Its Plone bundle (plone.bundles/imio.map.wallonia) points to imio.map.wallonia-remote.min.js. The chunks and the data files resolve relative to that script (webpack publicPath: "auto"), so a ++plone++imio.map.wallonia resource directory is all the add-on needs.

@patternslib/patternslib and @plone/mockup are pinned to the versions of plone.staticresources in the target Plone release (Plone 6.2.2: plone.staticresources 3.0.6, @plone/mockup 5.6.10, @patternslib/patternslib 9.10.7). Shared singletons check the version: with a major mismatch, the remote falls back to its own copy.

One React for all the iMio add-ons

The iMio add-ons share one React. Each one shares react, react-dom, react-dom/client and react/jsx-runtime (shared_react in webpack.config.js), and keeps react and react-dom at the same version. The page takes the highest version of each entry, so react and react-dom/client always have the same version, also when two add-ons have different patch versions. An add-on that shares only react and react-dom breaks this rule: its react-dom/client stays in its own bundle and can have another version than the shared react (React error #527). All the iMio add-ons use the same React major version.

Development

The built bundle is in src/imio/map/wallonia/browser/static/bundles/ and is committed: installing the Python package does not need Node.js. CI rebuilds it and fails if the committed files are not up to date.

JavaScript (Node.js 20 or later):

npm install
npm test            # Jest
npm run lint        # ESLint
npm start           # demo page and bundle on http://localhost:3002
npm run build       # writes static/bundles/: commit the result

To use the npm start bundle in a Plone site, enable the plone.bundles/imio.map.wallonia-devserver registry record and disable plone.bundles/imio.map.wallonia (Site Setup > Resource Registries).

Python (uses uv):

make install        # virtualenv with Plone and the test dependencies
make test           # pytest
make create-site    # Plone site with the add-on installed
make start          # http://localhost:8080
make check          # format and lint

make help lists all the targets, including js-build, js-start and js-test.

License

GPL version 2. See LICENSE.md.

Metadata

Release files for imio.map.wallonia 1.0.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for imio.map.wallonia 1.0.0a2
File Size Uploaded Provenance Actions
imio_map_wallonia-1.0.0a2.tar.gz 9.0 MB Without provenance Details for imio_map_wallonia-1.0.0a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for imio.map.wallonia 1.0.0a2
File Interpreter ABI Platform Actions
imio_map_wallonia-1.0.0a2-py3-none-any.whl Python 3 none any Details for imio_map_wallonia-1.0.0a2-py3-none-any.whl

Total release size: 13.7 MB

Release files / imio_map_wallonia-1.0.0a2.tar.gz

Download URL imio_map_wallonia-1.0.0a2.tar.gz
Size 9.0 MB
Tags Source
SHA-256 checksum
How to use checksums
ce59edeb96c08901090e0b2d00ffee96c09d298f9c2d7574d74eedfdd08c74b2
BLAKE2b-256 checksum
How to use checksums
a9ef995601a4dab311d3e54e75d2a1848b928ec56bccdca8bdb61c729ddc4c57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Release files / imio_map_wallonia-1.0.0a2-py3-none-any.whl

Download URL imio_map_wallonia-1.0.0a2-py3-none-any.whl
Size 4.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
854733c58b2d584e51b995a74d09178003aabf26b4aae80aa67a1603235f759a
BLAKE2b-256 checksum
How to use checksums
eb32d75afd72635ce4ca8a2d2d45abe6646baba199186728136570aaa0c25ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Security for imio.map.wallonia 1.0.0a2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page