Skip to content

Pluggable, lazily-imported map-link renderers by MIME type #1065

Open

Description

@prushforth

Currently in MapML.js, there's a mechanism to render pmtiles or mvt files via a "stylesheet module". i.e. markup like this

<map-link rel="stylesheet" type="application/pmtiles+stylesheet" href="lightTheme.js"></map-link>
...
<map-link rel="tile" type="application/pmtiles" tref="spearfish.pmtiles?theme=light"></map-link>

It would be great to be able to re-use this mechanism to create and dispatch custom rendering for idiosyncratic content types without bloating the core library via such dynamic imports, for example to custom render geotiff data:

<!-- geotiff-renderer.js is not part of the core -->
<map-link rel="stylesheet" type="application/geotiff+renderer" href="./geotiff-renderer.js"></map-link>
<map-link rel="tile" type="image/tiff; application=geotiff" tref="…"></map-link>

In light of the above the "+stylesheet" media type suffix might be incorrect, tbd, as it's a dynamic JavaScript module import internally.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions