NASA-IMPACT / veda-ui

Frontend for the Dashboard Evolution project
Other
19 stars 4 forks source link

Why Mapbox over free and open source mapping libraries? #69

Open abarciauskas-bgse opened 2 years ago

abarciauskas-bgse commented 2 years ago

In response to the question "Why Mapbox?" @danielfdsilva helped provide the following explanation:


TL;DR:

At the beginning of the project we looked at what was out there to understand if there was an alternative to mapbox (https://github.com/NASA-IMPACT/covid-dashboard/issues/557).

We were looking to have different types of projections while supporting vector layers and data-driven styling.

Because we were looking for vector layer support, mapbox was a strong choice and no other library is as powerful at doing data-driven styling.

Initially it lacked projections support, but then they added them - and globe projection is coming along.

This, tied with our extensive knowledge of mapbox, and close relationship made it an easy sell.

Now, looking at what we are working with right now, it seems that vector layers are not really needed - I’m actually not sure about this, but all our conversations seem to refer to tiled datasets.

This seemingly tiny change, means we could reassess and go with a different library.


It sounds like we may consider moving to another mapping client. From what I understand there are some deal-breaker requirements (and probably some that I am missing):

What are some other important features we need to consider in alternatives? @danielfdsilva also mentioned data-driven styling for example.

Is [CesiumJS]()https://cesium.com/platform/cesiumjs) worth exploring as well?

hanbyul-here commented 2 years ago

As far as I remember, Cesium's whole elevator pitch was about 'real 3d', not extracting 2d geometries. I think it expects whole different data format, I am not sure we can render tiles from titiler in Cesium? (I have zero hands-on experience with Cesium, so please correct me if I am wrong!)

Daniel already explained about the decision to use MapboxGL well but since I often think about my faith about using MapboxGL... leaving my thoughts here.

I think it is cool that NASA is looking to use more open source libraries. I think finding alternative will likely require investing a lot more of our resource (onboarding developers, bug fix, figuring out how to use it with UI framework...) in that alternative.

nerik commented 1 year ago

Just reviving this because I haven't seen any mention of MapLibre. This is originally a fork of Mapbox GL v1, the project is moving at a steady pace and it is very possible that support for projections come in the future - so let's keep an eye on it.

Also, bouncing on what @hanbyul-here said:

Using a map engine with modern UI framework (React, in our case) is sometimes tricky because each of them wants to control elements in its own ways.

I've been using react-map-gl for years now, and it has been a game changer. The idea is to make Mapbox GL friendly with the declarative paradigm of React. When intensively using Mapbox GL in a React app, this makes a huge difference - avoiding having to write all that glue code (all those useEffect) which makes codebases much easier to reason about and maintain IMHO. React-map-gl is very mature and stable (part of the vis.gl suite including deck.gl), and supports both Mapbox GL and MapLibre

nerik commented 1 year ago

So I gave it some thoughts: https://github.com/developmentseed/how/issues/376