Open rinigus opened 2 years ago
I think we should get rid of the built-in providers completely, and let people configure that themselves.
@louwers do we have an issue to bring something like MapLibre GL JS' addProtocol
to Native?
I transferred this proposal from Steve to the Native discussion forum. Before an issue is made we should have an idea about how to implement that and the scope.
Judging from Qt platform and from brief look into mbgl::Map, it looks like URI scheme used by the map has to be specified in its constructor. Namely, we have to set
TileServerOptions
to either supportmapbox://
,maptiler://
or any other schema. Later, while we can swap schema by giving its URL or JSON, that URI cannot be swapped. Which makes supporting multiple map providers harder than it should be.So, for now, I am setting the options to for Mapbox and if the user prefers to switch to MapTiler, I use full URL to give the style URL.
It would make sense to add ability to switch between
TileServerOptions
as we can switch the styles. Don't know whether it is already supported on other platforms, but on Qt it is not and, unless I missed it, it is not available for mbgl::Map either.