Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vector-tile support #289

Closed
Dirk-- opened this issue May 9, 2020 · 14 comments
Closed

vector-tile support #289

Dirk-- opened this issue May 9, 2020 · 14 comments

Comments

@Dirk--
Copy link

Dirk-- commented May 9, 2020

How about implementing vector-tile support?

Setup of a vector-tile provider is quite cheap (compared to generating raster tiles) on network data:
e.g. https://maps.grade.de/cemt.html

Having a chance integrating this to bouter-web would make this great framwork even greater!

@nrenner nrenner added the inbox To comment label May 9, 2020
@nrenner
Copy link
Owner

nrenner commented May 10, 2020

Leaflet doesn't support vector tiles natively and I fear there is no ideal plugin either, as we have learned in #153 (comments).

Maybe the mapbox-gl-leaflet binding would be the best option, but synchronizing two libraries probably also has its flaws and it's a bit like carrying a lorry with a van.

Don't know what your setup is, an easy way for integration would be serving the vector tiles as raster with Tileserver GL, but that would mean loosing many advantages of vector tiles.

@nrenner nrenner added feature request and removed inbox To comment labels May 10, 2020
@womisa
Copy link

womisa commented May 11, 2020

Hello
I've come up with a makeshift solution.
installed a local Vector Tileserver and integrated it via configuration in Brrouter web. This works very well for me.
server: hier
Maps:hier

@womisa
Copy link

womisa commented May 11, 2020 via email

@Dirk--
Copy link
Author

Dirk-- commented May 11, 2020

just a quick Leaflet.VectorGrid test:
https://maps.grade.de/Leaflet.VectorGrid_120.html
'maxNativeZoom' of tile source is '10'
As mentioned in issues/153 , overzooming sucks....

@Dirk--
Copy link
Author

Dirk-- commented May 12, 2020

today a first shot at Leaflet.VectorTileLayyer:
https://maps.grade.de/Leaflet.VectorTileLayer.html

  • overzooming works like expected
    Limitations:
  • no point features support (yet)

@Dirk--
Copy link
Author

Dirk-- commented May 13, 2020

and finally updated my ol vector map
https://maps.grade.de/cemt.html
and tile-source (maxZoom 14)
https://tiles.grade.de/tiles.py/cemt-vector-2020/{z}/{x}/{y}.pbf

@nrenner
Copy link
Owner

nrenner commented May 13, 2020

Thanks for the updates.

Are you going to test mapbox-gl-leaflet with Mapbox GL JS as well?

Right now, your layer looks simple enough for the plugins you already tested (beside the missing features) and Mapbox GL JS would probably be overkill, just like for the Mapillary coverage layer. But as soon as you want anything more advanced, like text label rendering, Mapbox GL JS would probably be the best option?

What is your stack to generate the vector tiles? When you say cheap, this means probably generating and uploading all tiles as static files in advance, without generation on request and automatic updates?

And by the way, why are you querying the Overpass API on point click, when vector tiles would allow including the data and interacting with it on the map?

@Dirk--
Copy link
Author

Dirk-- commented May 14, 2020

overpass query on click:

  • the user gets up-to-date data (eg. phone number of bridge/ lock)
  • I also query seamark, leisure, amenity, shop (data that is not on CEMT vector-tile layer, but might make the inland navigator happy)

@Dirk--
Copy link
Author

Dirk-- commented May 19, 2020

and here comes test number 3: https://maps.grade.de/Leaflet.mapboxGL.html

@nrenner
Copy link
Owner

nrenner commented May 22, 2020

Hm, zooming is a lot slower than with Leaflet or Mapbox GL JS alone.

@bagage bagage changed the title feature request: vector-tile support vector-tile support Jun 6, 2020
@Dirk--
Copy link
Author

Dirk-- commented Dec 1, 2021

thanks to Norbert's hints, I managed to inject a vector-tile-layer:
https://wiki.openstreetmap.org/wiki/User:Kannix/brouter/vector-tiles

@Dirk--
Copy link
Author

Dirk-- commented Dec 7, 2021

after fiddling with maplibreGL/mapboxGL the last days, I would vote for this.

  • supported by mapbox, openTiles, MapTiler (plus their offer of tools and infrastructure needed)
  • fairly easy setup, just decide base or overlay and link a single 'style' file (containing all about tile source and styling)

Vector-Layers are great for those, creating own maps with little effort!

@Dirk--
Copy link
Author

Dirk-- commented Dec 22, 2021

Sorry for uglifying the code, I am just no programmer ...

I would like to show two variants:

Relevant changes located at index-[].html (end of file) and /dist/brouter-web-[].js (search for 'grade.de')

Any pro up to beautifying the vector-layer idea?

@nrenner
Copy link
Owner

nrenner commented Jun 17, 2022

We now have MapLibre GL JS integrated (13efb48), see:

@nrenner nrenner closed this as completed Jun 17, 2022
@nrenner nrenner added this to the 0.18.0 milestone Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants