gpxstudio / gpx.studio

The online GPX file editor
https://gpx.studio/
MIT License
106 stars 16 forks source link

Support for Google Protobufs (PBF) Tile layers / overlays? #32

Closed nevvkid closed 1 week ago

nevvkid commented 1 month ago

I have to admit that I am not only a big fan of gpx.studio but also the Gravel Overlay by @mjaschen which are part of the bikerouter.de experience.

I would be a nice feature to be able to use that overlay with gpx.studio. Adding the custom overlay works - and it looks like the tiles are actually served. I am not sure why I can not see them.

The URL I tried for testing purposes is the following: https://tiles.bikerouter.de/services/gravel/tiles/{z}/{x}/{y}.pbf (not knowing if it would be ok to just use it long term without asking / making a donation)

To get an idea how this would look like on the OpenStreetMap Basemap here is a screenshot:

image

Here is a post about the Gravel Overlay 2.0 by the creator: https://www.marcusjaschen.de/blog/2022/gravel-overlay-brouter-bikerouter/

nevvkid commented 1 month ago
image image
vcoppe commented 1 month ago

The website already supports vector layers. However, you need a Mapbox style JSON to specify how to style the data contained in .pbf files. I have seen on bikerouter.de that this information is hardcoded there. If you know this project well, maybe you can contact its owner to ask whether it would be okay to include this layer here?

vcoppe commented 1 week ago

Any news?

nevvkid commented 1 week ago

I got following response from the creator of the overlay.

The style for the Gravel-Overlay can be found here: https://github.com/mjaschen/gravel-overlay.

The tiles themselves can be accessed at https://tiles.bikerouter.de/services/gravel/. This URL must be included in the style.json under sources.openmaptiles.url (the version in the GitHub repo contains the local development URL).

I cannot undertake integration into third-party services, nor do I provide any guarantees regarding the availability or consistency of the tileserver URLs. However, since I have just set up the tileserver for the Gravel Overlay, the URLs should be stable for a while.

Maybe the layer could be made available as an optional layer? If it sees a lot of demand maybe there is a solution for hosting the overlay - pretty sure Í know someone who could help with infrastructure support.

vcoppe commented 1 week ago

That's very nice of him!

I have managed to add the layer to the website, but had to break many things to make it work. Custom layers need to be refreshed to work (just by clicking on "Update layer"), and overall the website needs some testing to make sure it still works as before.

zod commented 1 week ago

This is a feature that I'm currently missing in brouter-web (nrenner/brouter-web#775) so I'm very happy that it's supported by gpx.studio. I've just done a quick test and it seems to work just fine :)

vcoppe commented 5 days ago

This is a feature that I'm currently missing in brouter-web

Since the Gravel Overlay 2.0 vector overlay layer is displayed on https://bikerouter.de (which is based on brouter-web), it seems technically doable.

zod commented 5 days ago

Yes, in brouter-web it's supported for "built-in" layers, but not for custom layers.