maplibre-react-native
maplibre-react-native copied to clipboard
Decide how to handle the upstream Android divergences
The weird getInstance dance on Android has also evolved its type signature to accept an optional "well-known tile provider" (basically just Mapbox or Maptiler; should be expanded). We currently init with the default MapLibre, but this creates a confusing interface, which ties into the next problem...
It appears that the upstream API has diverged on Android and now there is a setApiKey method (instead of setAccessToken) which appears to only apply to Mapbox (my understanding is this is how iOS also works but need to verify). We need to verify if these two are in any way related.
Finally, this wrapper retains the extremely undesirable property of the upstream SDK of requiring you to "init" the SDK with a null API key; this is confusing and results in shared code that may run quite fine on iOS but will throw an exception on first launch on Android if you forget to set the null API key.