-
Notifications
You must be signed in to change notification settings - Fork 2
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
As a developer I want to decide which map library we want to use in UI #26
Comments
maplibre has finally released a stable version: https://www.npmjs.com/package/maplibre-gl visgl has advice on how to switch from mapbox-gl to maplibre-gl: https://github.com/visgl/react-map-gl/blob/db08714945b106062a9e8b87722a8c0e343eb3de/docs/get-started/get-started.md#using-with-a-mapbox-gl-fork |
To have it in writing, map data in vector tiles is rendered into images in the frontend. Raster tiles are rendered into images in advance in the backend, instead. Raster tiles look like static pictures on top of which you can draw. With vector tiles you can modify the visuals according to the current user context in the frontend, e.g. fatten a road or draw a halo around it if the road needs highlighting. Vector maps enable more beauty and UI possibilities. On the other hand, vector tiles can be slow if they are not drawn using the GPU. maplibre uses WebGL. To my knowledge, existing Leaflet plugins do not. In my experience, raster tiles are easier to handle. They've been around longer and they have less sharp edges. |
Regarding maplibre React layers:
|
maplibre activity is still building momentum. I believe there are many organizations that use mapbox-gl v1, that will not switch to the closed-source version 2 and that will migrate to maplibre. |
As also @jarkkoka brought up, Leaflet is simple and easy for small stuff and OpenLayers is featureful. Maplibre produces pretty maps and relies on Turf.js to do the GIS tricks. Here's some recent discussion comparing OpenLayers and maplibre: https://news.ycombinator.com/item?id=26682403 OpenLayers has poor React support, if I remember correctly what I read elsewhere from other people's experiences. |
Aspects for comparison:
|
|
Zooming and panning come for free after the map is rendered. So maybe these functionalities act as a start:
Report on ergonomics, visualization quality/beauty, experienced performance, missing/bonus abilities. Next iterations:
|
@pallost I suggest we keep this issue open and collect the experiences here. Feel free to close if you had other plans for documenting the results. |
Did a little bit of testing in https://github.com/HSLdevcom/jore4-maplibre-experiment repository. During testing I made at least following random observations about maplibre:
mapboxApiAccessToken=""
mapboxApiUrl=""
|
Also did some experiementing with OpenLayers/rlayers. ~Now I also noticed that there is |
DeckGL's TS-typings are WIP: https://github.com/danmarshall/deckgl-typings |
We discussed about map library alternatives with the team. OpenLayers had weak react support and no strong benefits against MapGL, so it was first one to be discarded. At least one team member had prior experience from leaflet. It was not perfect and suffered from occasional memory leaks, but its still somehow battle tested and also used by HSL in jore-map-ui. Biggest concerns with leaflet were performance when lots of contents (e.g. Digiroad) is drawn on the screen and how well drawing routes is going to work. Those are things which we aim to verify in the near future. tl;dr Leaflet was choses as map library |
Windy.com API supports Leaflet only. |
As a developer I want to know which map libraries are used so that I can create best possible outcome for the UI.
Different libraries are evaluated on separate issues. This ticket includes only comparing those results and making the final decision.
Common alternatives:
And React layers for them:
The text was updated successfully, but these errors were encountered: