Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Seems like MapTiler is maintaining an open source full stack vector alternative, and OpenLayers[0] looks good as well, so maybe it's time for legacy libraries to add vector support, or for users to switch libraries? There's even bindings from Maplibre GL to Leaflet [1].

I at least would find it interesting to see the two compared by someone other than me ;).

[0] https://openlayers.org/

[1] https://github.com/maplibre/maplibre-gl-leaflet



Well, I wrote one already for leaflet ;)

https://github.com/protomaps/protomaps.js

TBH, the blocker is not demand for vector rendering but the technical difficulty and performance constraints of doing rasterization in the browser.


Nice! Only on Hacker news can you make a comment about some kind of hypothetical programming project and have the reply be "Yes, I've made one of those already".

Do you think it's still too early to switch to vector map data for all clients then? Maybe render raster tiles on demand on the server to those clients that can't handle it?


The barriers to adopting vector-everywhere are social and commercial, not technical.

There are a couple great public raster services like osm.org's default style and http://maps.stamen.com. These are 100% free to use, so they get used everywhere, but incur significant expense to the organizations running (paying) for them.

There aren't equivalent solutions in vector-land yet... I wrote a bit about this previously: https://protomaps.com/blog/free-tier-maps


https://maps.qwant.com uses vector tiles, altough polygon simplification at lower zoom levels could be improved.

Their stack is open sorce, described there: https://github.com/Qwant/qwantmaps#tile-server


Thanks for this. I remember using MVTs on HTML Canvas with Leaflet via plugin way back in 2017.[1] It wasn't perfect, but browser rendering has definitely been the bigger issue than anything with Leaflet.

[1]: https://github.com/SpatialServer/Leaflet.MapboxVectorTile


Can't you just convert the data to SVG and let the browser display that?


SVG will become sluggish past a few thousand features, which is typical for viewing an urban area on the map.


>> SVG will become sluggish past a few thousand features, which is typical for viewing an urban area on the map.

So lets optimize the browsers SVG rendering?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: