Skip to content

Add support for changing background map service in HTML#151

Merged
jampukka merged 1 commit intomainfrom
html-template-wmts
Sep 16, 2025
Merged

Add support for changing background map service in HTML#151
jampukka merged 1 commit intomainfrom
html-template-wmts

Conversation

@jampukka
Copy link
Collaborator

Should fix #133

  • Add two new properties usable in featureCollection and feature HTML templates
    • settings.tileUrl
    • settings.tileAttribution
  • Change the built-in HTML template files featureCollection.ftl and feature.ftl to use said properties
  • The value of these properties can be configured via formats.html.tileUrl and formats.html.tileAttribution (see example below)
    • If nothing is configured the values default to OpenStreetMap tileUrl and tileAttribution
  • Does not affect the built-in templates featureCollection_3067.ftl or feature_3067.ftl
    • Current solution of custom template per coordinate reference system isn't scalable, requires separate attention in the future

Example configuration snippet:

formats=json,html
formats.html.tileUrl=https://avoin-karttakuva.maanmittauslaitos.fi/avoin/wmts/1.0.0/taustakartta/default/WGS84_Pseudo-Mercator/{z}/{y}/{x}.png?api-key=<your api key>
formats.html.tileAttribution=&copy; <a href="https://www.nls.fi">National Land Survey of Finland</a>

@nls-jajuko nls-jajuko added this to the 1.6.0 milestone Aug 29, 2025
@jampukka jampukka merged commit 5beae5c into main Sep 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for changing a background map service in HTML view

2 participants