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.

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.0a1

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.0a1
File Size Uploaded Provenance Actions
imio_map_wallonia-1.0.0a1.tar.gz 9.0 MB Without provenance Details for imio_map_wallonia-1.0.0a1.tar.gz

Built distribution (wheel)

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

Total release size: 13.7 MB

Release files / imio_map_wallonia-1.0.0a1.tar.gz

Download URL imio_map_wallonia-1.0.0a1.tar.gz
Size 9.0 MB
Tags Source
SHA-256 checksum
How to use checksums
6c9833b5e1b4219b9abc554c600c209ab7750a3f8a7160dab4c5f72d7f009898
BLAKE2b-256 checksum
How to use checksums
87edf7c346ae5ec96aa68dd52a46f8b46e8710e5135f26be08ea6e70d8a99233
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.0a1-py3-none-any.whl

Download URL imio_map_wallonia-1.0.0a1-py3-none-any.whl
Size 4.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d5167b652939c9e21e141e327d51abb1eee5b9b2c785fc7ad241a03b16e5c006
BLAKE2b-256 checksum
How to use checksums
a6ee03bc47b99419484727bfe0c6080e6e5d44037f927ef65ec69b0acb5ff638
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.0a1

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