Maps4HTML / MapML.js

A custom <mapml-viewer> and <layer-> element suite
https://maps4html.org/MapML.js/
Other
56 stars 16 forks source link

Ensure remote mapml with pmtils selects correct stylesheet #977

Closed prushforth closed 2 weeks ago

prushforth commented 2 weeks ago

The selector algorithm to find the closest relevant map-link[rel=stylesheet][type=application/pmtiles+stylesheet] in an ancestor needs to take into account that pmtiles-referencing map-links can be local or remote mapml.

Steps to reproduce

Open https://maps4html.org/experiments/vector-tiles/pmtiles/index.html Clear the sole checked layer checkbox in the layer control Check the layer titled 'pmtiles' Under styles in the layer's settings, select the 'Dark theme' style

What happens:

Console warning:

image

What should happen:

The map should display the pmtiles' Dark theme:

image