onthegomap / maplibre-contour

Render contour lines from raster DEM tiles in maplibre-gl-js
https://onthegomap.github.io/maplibre-contour/
Other
155 stars 15 forks source link

Feature request: provide support for PMTiles format files? #212

Open anders86755 opened 4 months ago

anders86755 commented 4 months ago

About PMTiles format : https://github.com/protomaps/PMTiles

The current initialization of demSource is as follows:

const demSource = new mlcontour.DemSource({
        url: 'https://demotiles.maplibre.org/terrain-tiles/{z}/{x}/{y}.png',
        encoding: 'mapbox',
        maxzoom: 12,
        worker: true
    });

If support for pmtiles format could be implemented, for example:

const demSource = new mlcontour.DemSource({
        url: 'pmtiles://https://xxx.xxx.com/xxx.pmtiles',
        encoding: 'mapbox',
        maxzoom: 12,
        worker: true
    });

The pmtiles format is very promising. It would be great if your plug-in could support this format.

Anyway,Thanks for this great plugin :)

Patukas commented 4 months ago

Same case here.

I am using pmtiles for dem source.

I am interested in use maplibre-contour.

Thanks.

msbarry commented 4 months ago

Yep! This is a known limitation of the plugin. I'm working to move this functionality into maplibre so you don't need this plugin anymore: https://github.com/maplibre/maplibre-style-spec/issues/583. Then you'll be able to use the pmtiles plugin for dem tiles that power a built-in contour source you can render line and label layers from.