opengeos / mapwidget

Custom Jupyter widgets for creating interactive 2D/3D maps using popular JavaScript libraries with bidirectional communication, such as Cesium, Mapbox, MapLibre, Leaflet, and OpenLayers
http://mapwidget.gishub.org
MIT License
223 stars 14 forks source link

Add PMTiles support to MapLibre #14

Closed daniel-fink closed 4 months ago

daniel-fink commented 1 year ago

Is there a way to support adding PMTiles to MapWidget MapLibre maps?

PMTiles are an open-source solution for single-file archive format for tiled data:

A PMTiles archive can be hosted on a commodity storage platform such as S3, and enables low-cost, zero-maintenance map applications that are "serverless" - free of a custom tile backend or third party provider.

See https://github.com/protomaps/PMTiles and https://protomaps.com/docs/pmtiles

For use in MapLibre, it apparently needs an additional JS plugin (see https://protomaps.com/docs/frontends/maplibre -- "For reading PMTiles directly from cloud storage, you'll need the pmtiles JavaScript library."

giswqs commented 1 year ago

I am aware of PMTiles. I tried to use it before. See the relevant issues below. I am not a JavaScript user, and I am not capable of making it work at the moment. Contrbutions are welcome.

https://github.com/protomaps/PMTiles/discussions/209 https://github.com/widgetti/ipyreact/issues/44

daniel-fink commented 1 year ago

Thanks for the response. I am also not proficient at JS. Forgive my naivety, but this example looks like it simply enables pmtiles to be added to a maplibre map via loading a JS library in an HTML page: https://github.com/protomaps/PMTiles/blob/main/js/examples/maplibre.html#L7C36-L7C36, and the content is specified in line 24 of the Githubissues.

  • Githubissues is a development platform for aggregating issues.