-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
Replacing hardcoded configuration with configurable API and removing Mapbox assets #90
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ot hardcoded - part 1
… into tile-server-properties
…d TileServerOptions to relevant classes and method in order to remove mapbox hardocded configuration
… into tile-server-properties
…s from FileSource
…s from FileSource - part 2
…plementing JNI conversion for TileServerOptions
…TileServerOptions in Android SDK. Minor fixes.
… MapTiler configuration, cleanup
…oving mapbox stuff from comments, cleanup
…e sources, more tests
This was referenced May 28, 2021
thats massive. thank you! :) |
roblabs
added a commit
to roblabs/openmaptiles-ios-demo
that referenced
this pull request
Jun 29, 2021
Test Maplibre Style changes from maplibre/maplibre-native#90
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes hardcoded Mapbox configuration and local (as well as references to remote) assets from the project. MapLibre was using Mapbox styles, sources, glyphs, ... so far everywhere in unit tests, integration tests and test application and references to these assets were hardcoded in the codebase. For the future stability of the development environment it was necessary to migrate away from Mapbox infrastructure.The goal of this PR is:
Style.STREETS
with configurable onesmapbox-android-account
Most changes introduced by this PR are not visible publicly because they were made in unit/integration tests and test apps. The publicly visible changes are:
Mapbox getInstance(Context context, String apiKey)
before the app instantiates anyMapView
(or inflates any view). The purpose of this call is to establish connection with the native Mapbox core library and set the globally shared access token. This PR extends the method to accept additional parameterWellKnownTileServer
enum which currently has three possible options:MapLibre
,Mapbox
andMapTiler
. For user who don't need any predefined backend, it is possible to useMapbox.getInstance(Context context)
.Style.MAPBOX_STREETS)
were removed fromStyle
class and replaced withgetPredefinedStyle(String name)
method which allows to get style URL using a string key. This method uses the configuration specified on startup.[MGLSettings useWellKnownTileServer:];
to configure the remote tile server. It has to be done before the app instantiates anyMapView
Possible options are:MGLMapLibre
,MGLMapbox
andMGLMapTiler
.MGLStyle
class and replaced with+ (MGLDefaultStyle*) predefinedStyle:(NSString*)withStyleName;
method which allows to get style URL using a string key. This method uses the configuration specified on startup.The predefined tile servers and styles are configured in src/mbgl/util/tile_server_options.cpp class.
The names
access_token
,mapbox access token
etc were replaced withApiKey
everywhere (MGL_API_KEY
in scripts) and for local development purposes the api key can be set in~/maplibre
file.There are still some places in the codebase where mapbox stuff is being referenced or used, but since this PR is huge one, it should be removed in another separate PRs. It will be also necessary to update the documentation.