Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Access token can be omit on iOS SDK and JS SDK, but it is required on Android SDK #632

Closed
bahung1221 opened this issue Dec 26, 2020 · 1 comment

Comments

@bahung1221
Copy link

Hi,

I'm using react-native-mapbox-gl/maps (which depend on mapbox/mapbox-gl-native-android) to render my map without use any tiles or styles from Mapbox service. All tiles, styles, fonts were self-hosted on my server.
So I didn't have any Mapbox access token, it worked very well on iOS and browser, but doesn't work on android.

I found a PR from mapbox/mapbox-gl-native repo that was merged in 2018, it seems that PR allowed us to omit the access token. But it seems that mapbox/mapbox-gl-native-android doesn't allow it.

if (!Mapbox.hasInstance()) {
throw new MapboxConfigurationException();
}

I think if Mapbox GL is open source and also the iOS & JS version was allowed omit the access token, the Android version should allow developers to omit it, too.

Screen Shot 2020-12-26 at 18 20 13

Thank you so much!

@bahung1221 bahung1221 changed the title Access token can be omit on iOS SDK but required on Android SDK Access token can be omit on iOS SDK and JS SDK, but it is required on Android SDK Dec 26, 2020
@bahung1221
Copy link
Author

Found it out, I can set token as an empty string and it worked now,
It will be awesome if documentation has a note for it.

Thank you for your work hard!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant