Skip to content

Background map support defaults on Hakunapi item and items HTML pages #198

Closed

Description

@teezip

This issue describes expected background map projection on collections/{collection}/items/ and collections/{collection}/items/{id} pages.

Related to #199 if refactoring HTML packages (see also comments below on this issue).

Basic principles

Based on the meeting 22th June 2026:

  • Showing map user interface is NOT a core feature of Hakunapi collections resources.
  • The map user interface is purely additional demo feature.
  • Background maps are shown only for those coordinate systems to which an open tile map service is easily available without need to develop client side customization or hacks.
  • When suitable background map is not available, the map user interface shows only feature geometries without background map.

These principles apply to both cases described below.

Generic services published using Hakunapi

OpenStreetMap currently used as default (for example https://tile.openstreetmap.org/13/4671/2305.png) and this should be the default behaviour.

NLS of Finland specific services published using Hakunapi

Choices on NLS of Finland specific services with sample tiles:

  • avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/taustakartta/default/ETRS-TM35FIN/8/123/123.png
  • avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/taustakartta/default/WGS84_Pseudo-Mercator/13/2305/4671.png

Background map projected as WGS84_Pseudo-Mercator could be used when selecting geographic coordinates (CRS:84, CRS:84h, EPSG:4326, EPSG:4258, EPSG:10690, EPSG:10689 or EPSG:10692) or web mercator (EPSG:3857) on the user interface.

Background map projected as ETRS-TM35FIN should be used when TM35FIN projection is used (at least EPSG:3067, EPSG:3903, EPSG:10774).

ETRS-GKnn background map tiles are not available as open service, so when ETRS-GKnn is selected, no background map is shown.

Other notes

Decision between current Leaflet and commented OpenLayers specific solutions is another question. Relates also to #199.

Activity

  1. added this to the 2.1.0 milestone on May 11, 2026
  2. added theissue type on May 11, 2026
  3. teezip commented on May 12, 2026

    @teezip
    CollaboratorAuthor

    See also HTML page with Open Layers based background map interface implemented by a community module.

    Source code: https://github.com/nls-jajuko/hakunapi-html-npm-openlayers

    demo:
    https://kauppahintatilasto.nls.fi/tilastopalvelu/features/1.1/collections/pno_hakuna_2026/items?crs=http%3A%2F%2Fwww.opengis.net%2Fdef%2Fcrs%2FEPSG%2F0%2F3883#0.12/64.8/24.6

    In version 2.1.0 this should be analyzed whether to use OpenLayers based instead of Leaflet in Hakunapi core packages.

  4. teezip commented on Jun 22, 2026

    @teezip
    CollaboratorAuthor

    Related to OpenLayers based sample mentioned in previous comment: OpenLayers new release in autumn 2026 potentially enhances bundled packages (on HTML output).

  5. teezip commented on Jun 22, 2026

    @teezip
    CollaboratorAuthor

    See also changes April/May 2026 #191

  6. jampukka commented on Oct 22, 2026

    @jampukka
    Collaborator

    No background layer configured for EPSG:3879:
    Image

  7. jampukka commented on Oct 22, 2026

    @jampukka
    Collaborator

    This should be done via #245. Keeping Leaflet in default templates for now, if we want to revisit switch to OpenLayers we should create another issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions