Closed tarngerine closed 3 years ago
The easiest way to access this right now is creating a bundle on https://protomaps.com/bundles and looking at gl.html
in the downloaded ZIP.
This isn't using MapLibre yet until PR 30 at https://github.com/maplibre/maplibre-gl-js/pulls is merged.
I do need to add some other examples around using MapLibre/JSON styles, so let's continue in this new issue I made on another repo: https://github.com/protomaps/protomaps-themes/issues/8
oh interesting! i thought it already supported custom tiles
but now reading this code i grabbed from online somewhere, it looks like its just for raster. so the missing functionality is support for custom vector tiles (not raster)?
thanks as always for the fast response
The missing functionality is custom Protocol support in MapLibre. The way Mapbox 1.13 and MapLibre 1.14 work is that they must consume a Z/X/Y tile URL (an HTTP web service) for vector or raster tiles
All my examples/tools for protomaps.js work with either a Z/X/Y tile URL like above, or a local PMTiles file hosted on your own computer or an S3-like service. To make that second option, PMTiles work in MapLibre, I currently use my own fork of version 1.13 in the gl.html, but it's hacky. If you want to use Z/X/Y tile urls e.g. api.protomaps.com/tiles/v2/{z}/{x}/{y}.pbf it should work just fine with any version of MapBox GL <=1.13 or MapLibre; I don't have good examples yet but basically you need to work off of this json style: https://github.com/protomaps/protomaps-themes/blob/master/mbgl/base.json
oh gotcha, that works great! thanks~
@tarngerine see https://github.com/protomaps/protomaps-themes/issues/8#issuecomment-859597903 for more info on GL styles
Hi again! I'm testing perf differences between Maplibre and Leaflet and was curious when you might have time to make a Maplibre example for https://protomaps.com/docs/alternate-renderers
Thanks! Julius