Skip to content
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
merged 85 commits into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
a7928b4
Refactoring online file source so that tile server configuration is n…
petr-pokorny-1 Feb 2, 2021
1f3841a
Added default templates
petr-pokorny-1 Feb 3, 2021
91361a0
Merge branch 'master' of https://github.com/maplibre/maplibre-gl-nati…
petr-pokorny-1 Apr 8, 2021
12e2ad3
Update from master
petr-pokorny-1 Apr 8, 2021
a8b7270
Renaming MGLAccountManager to MGLSettings. Passing ResourceOptions an…
petr-pokorny-1 Apr 25, 2021
30ce45a
Merge branch 'master' of https://github.com/maplibre/maplibre-gl-nati…
petr-pokorny-1 Apr 25, 2021
e390af4
Fixing build
petr-pokorny-1 Apr 25, 2021
3ed99ea
Addedm missing theme
petr-pokorny-1 Apr 26, 2021
9d1d78c
Unit tests fixes
petr-pokorny-1 Apr 26, 2021
068307a
Fixing unit tests, adding factory methods for creating predefined con…
petr-pokorny-1 Apr 26, 2021
6271679
Fixing mapbox unit tests
petr-pokorny-1 Apr 27, 2021
f6cf676
Additional unit test fixes
petr-pokorny-1 Apr 27, 2021
4b75668
Making MapboxConfiguration default
petr-pokorny-1 Apr 27, 2021
f9a9652
Making get/set resource options available in all classes that inherit…
petr-pokorny-1 Apr 29, 2021
82889d5
Making get/set resource options available in all classes that inherit…
petr-pokorny-1 Apr 30, 2021
f646cce
Fixes for Android
petr-pokorny-1 May 1, 2021
523856c
Disable test coverage reports
petr-pokorny-1 May 1, 2021
0af8db2
Disable test coverage reports
petr-pokorny-1 May 1, 2021
9712ba7
Disable test coverage reports
petr-pokorny-1 May 1, 2021
c2123a8
Disable test coverage reports
petr-pokorny-1 May 2, 2021
0e6ec34
Removing hardcoded configuration in iOS project - part 1
petr-pokorny-1 May 10, 2021
761ea87
Fixing wrong file extension, making use of tile server options.
petr-pokorny-1 May 10, 2021
ab18a8d
Use apiKey and MGL_API_KEY everywhere
petr-pokorny-1 May 11, 2021
5899d79
Just a rename
petr-pokorny-1 May 11, 2021
a78c185
Re-enabling tests and improving MGLSettings init
petr-pokorny-1 May 11, 2021
3928a84
Removing mapbox hardcoded configuration, using api key everywhere, im…
petr-pokorny-1 May 11, 2021
82f9ebd
Lint issues.
petr-pokorny-1 May 11, 2021
afb5ec6
Integrating configurable tile server properties into Android SDK - pa…
petr-pokorny-1 May 12, 2021
9af9003
Removing mabox accounts
petr-pokorny-1 May 12, 2021
9b6c38e
Exposing multiple configurations to Android SDK - bug fixes
petr-pokorny-1 May 12, 2021
95b596f
Removing TileServerOptions from public interface - native methods don…
petr-pokorny-1 May 12, 2021
3e1f8f5
Adding support for configurable predefined styles
petr-pokorny-1 May 13, 2021
fd77efa
Migrating predefined styles in test app + cleanup
petr-pokorny-1 May 13, 2021
ec46c48
Parameter fix
petr-pokorny-1 May 13, 2021
72ae836
Bug fixes
petr-pokorny-1 May 13, 2021
89a0986
Fixing render test build
petr-pokorny-1 May 13, 2021
4cd06c6
Fixing offline tester
petr-pokorny-1 May 13, 2021
6349bc9
Fixing benchmark tool
petr-pokorny-1 May 13, 2021
d6327e5
Fix: typo in method name
petr-pokorny-1 May 14, 2021
0be0931
Adding code for public access to TileServerOptions
petr-pokorny-1 May 14, 2021
85028a7
Bug fixes and debug code removal
petr-pokorny-1 May 14, 2021
9db8914
Merge branch 'master' of https://github.com/maplibre/maplibre-gl-nati…
petr-pokorny-1 May 17, 2021
4052dc4
Fixes for macOS, adding unit tests from MapLibre, removing redundant …
petr-pokorny-1 May 17, 2021
d4c717d
Unit test fixes
petr-pokorny-1 May 17, 2021
2701d50
MacOS test app - migrating to configurable tile server options, part 1
petr-pokorny-1 May 17, 2021
fdb5f26
Fixing offline maps
petr-pokorny-1 May 18, 2021
fc563f7
Migrating macOS test app to MapTiler
petr-pokorny-1 May 18, 2021
4f81cbf
Minor improvements
petr-pokorny-1 May 18, 2021
29f458e
Putting back apiKey test
petr-pokorny-1 May 18, 2021
3531a8d
Added unit tests for MapTiler configuration
petr-pokorny-1 May 18, 2021
10a4322
Migrating test resources to MapTiler
petr-pokorny-1 May 18, 2021
2b8d3d6
minor fix
petr-pokorny-1 May 18, 2021
c8ed036
A few fixes
petr-pokorny-1 May 19, 2021
5396b58
Fixing macOS tests, removing feedback functionality
petr-pokorny-1 May 19, 2021
93d3337
Migrating ios test app to MapTiler
petr-pokorny-1 May 19, 2021
f98e8ef
Migrating ui tests
petr-pokorny-1 May 19, 2021
6184af2
UI tests fix
petr-pokorny-1 May 20, 2021
2fc7cee
Benchmarking app fix
petr-pokorny-1 May 20, 2021
196e8a8
Cleanup and strings updates
petr-pokorny-1 May 20, 2021
b155b42
Merge branch 'master' of https://github.com/maplibre/maplibre-gl-nati…
petr-pokorny-1 May 20, 2021
7305bc0
Migrating benchmark app to maptiler
petr-pokorny-1 May 20, 2021
3738346
API key injection in benchmark app
petr-pokorny-1 May 20, 2021
67e9395
Putting back release configuration
petr-pokorny-1 May 20, 2021
1daac28
Merge branch 'master' of https://github.com/maplibre/maplibre-gl-nati…
petr-pokorny-1 May 20, 2021
738b7bd
Additional tests and fixing issues identified by thread sanitizer.
petr-pokorny-1 May 21, 2021
1b35211
Removing test filters
petr-pokorny-1 May 21, 2021
b711ac0
Fixes and addressing lint issues
petr-pokorny-1 May 22, 2021
1a0d160
More Maptiler tests + minro fix
petr-pokorny-1 May 24, 2021
dc2c363
Android instrumentation test migration to MapTiler. Exposing missing …
petr-pokorny-1 May 24, 2021
2f06e3f
No requirements on API key format.
petr-pokorny-1 May 24, 2021
26c4329
Fixing offline cache test tool
petr-pokorny-1 May 25, 2021
1765798
Adding configurable domain name for sources, adding source domain int…
petr-pokorny-1 May 25, 2021
4ad45a5
Migrating tests to MapTiler, adding code for canonicalizing URLs, rem…
petr-pokorny-1 May 26, 2021
8570b9a
More tests
petr-pokorny-1 May 26, 2021
8d3b22d
Updated database size
petr-pokorny-1 May 26, 2021
6ed4bc9
Lint issues
petr-pokorny-1 May 26, 2021
53db79f
Fixed test
petr-pokorny-1 May 26, 2021
8089f7b
Updating developer config API key
petr-pokorny-1 May 27, 2021
cfde16c
Fixes for Android, propagaing updated tileServerOptions to native fil…
petr-pokorny-1 May 27, 2021
c5e4237
Just a few more fixes
petr-pokorny-1 May 27, 2021
60a705f
Propagating updated settings to file sources + additional unit test
petr-pokorny-1 May 27, 2021
8f64f7a
Lint issues
petr-pokorny-1 May 28, 2021
3a1375a
Removing test filter and fixing incorrect uri
petr-pokorny-1 Jun 29, 2021
79c0040
Release preparation
petr-pokorny-1 Jun 29, 2021
05fb4c6
macos release notes
petr-pokorny-1 Jun 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ jobs:

- name: Build Test APK
run: |
MAPBOX_DEVELOPER_CONFIG_XML='${{ secrets.MAPBOX_DEVELOPER_CONFIG_XML }}'
if [ -n "${MAPBOX_DEVELOPER_CONFIG_XML}" ]; then
echo "${MAPBOX_DEVELOPER_CONFIG_XML}" > MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml
MAPLIBRE_DEVELOPER_CONFIG_XML='${{ secrets.MAPLIBRE_DEVELOPER_CONFIG_XML }}'
if [ -n "${MAPLIBRE_DEVELOPER_CONFIG_XML}" ]; then
echo "${MAPLIBRE_DEVELOPER_CONFIG_XML}" > MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml
make android-ui-test-arm-v8
else
echo "No secrets.MAPBOX_DEVELOPER_CONFIG_XML variable set, skipping apk build..."
echo "No secrets.MAPLIBRE_DEVELOPER_CONFIG_XML variable set, skipping apk build..."
fi
shell: bash

Expand All @@ -127,7 +127,7 @@ jobs:
--app MapboxGLAndroidSDKTestApp/build/outputs/apk/debug/MapboxGLAndroidSDKTestApp-debug.apk \
--test MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/debug/MapboxGLAndroidSDKTestApp-debug-androidTest.apk \
--device-ids sailfish --os-version-ids 26 --locales en --orientations portrait --timeout 20m \
--environment-variables coverage=true,coverageFile="/sdcard/coverage.ec" --directories-to-pull /sdcard --results-dir mapbox-android-sdk-${CIRCLE_BUILD_NUM}
--environment-variables coverage=true,coverageFile="/sdcard/coverage.ec" --directories-to-pull /sdcard --results-dir maplibre-android-sdk-${{ github.run_number }}
else
echo "No secrets.GLCLOUD_SERVICE_JSON variable set, skipping instrumentation tests..."
fi
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ jobs:

- name: Build release Test App
run: |
MAPBOX_DEVELOPER_CONFIG_XML='${{ secrets.MAPBOX_DEVELOPER_CONFIG_XML }}'
if [ -n "${MAPBOX_DEVELOPER_CONFIG_XML}" ]; then
echo "${MAPBOX_DEVELOPER_CONFIG_XML}" > MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml
MAPLIBRE_DEVELOPER_CONFIG_XML='${{ secrets.MAPLIBRE_DEVELOPER_CONFIG_XML }}'
if [ -n "${MAPLIBRE_DEVELOPER_CONFIG_XML}" ]; then
echo "${MAPLIBRE_DEVELOPER_CONFIG_XML}" > MapboxGLAndroidSDKTestApp/src/main/res/values/developer-config.xml
make android
else
echo "No secrets.MAPBOX_DEVELOPER_CONFIG_XML variable set, skipping apk build..."
echo "No secrets.MAPLIBRE_DEVELOPER_CONFIG_XML variable set, skipping apk build..."
fi
shell: bash

Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,13 @@
/new_offline.db
*.gpg
/.vscode
/platform/android/node_modules
/platform/android/signing-key.text
/platform/android/.java-version
*.hprof
/platform/ios/platform/ios/benchmark/assets/tiles/tiles
/platform/ios/platform/ios/benchmark/assets/glyphs/Roboto Regular,Noto Sans Regular
/platform/ios/platform/ios/benchmark/assets/glyphs/Roboto Medium,Noto Sans Regular
/platform/ios/platform/ios/benchmark/assets/glyphs/Roboto Condensed Italic,Noto Sans Italic
/platform/ios/platform/ios/benchmark/assets/glyphs/Noto Sans Regular
/platform/android/key.json
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ add_library(
${PROJECT_SOURCE_DIR}/include/mbgl/util/run_loop.hpp
${PROJECT_SOURCE_DIR}/include/mbgl/util/size.hpp
${PROJECT_SOURCE_DIR}/include/mbgl/util/string.hpp
${PROJECT_SOURCE_DIR}/include/mbgl/util/default_style.hpp
${PROJECT_SOURCE_DIR}/include/mbgl/util/tile_server_options.hpp
${PROJECT_SOURCE_DIR}/include/mbgl/util/thread.hpp
${PROJECT_SOURCE_DIR}/include/mbgl/util/tileset.hpp
${PROJECT_SOURCE_DIR}/include/mbgl/util/timer.hpp
Expand Down Expand Up @@ -529,7 +531,7 @@ add_library(
${PROJECT_SOURCE_DIR}/src/mbgl/sprite/sprite_parser.cpp
${PROJECT_SOURCE_DIR}/src/mbgl/sprite/sprite_parser.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/storage/asset_file_source.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/storage/mbtiles_file_source.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/storage/mbtiles_file_source.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/storage/file_source_manager.cpp
${PROJECT_SOURCE_DIR}/src/mbgl/storage/http_file_source.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/storage/local_file_source.hpp
Expand Down Expand Up @@ -810,6 +812,8 @@ add_library(
${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_cover_impl.cpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_cover_impl.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_range.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/default_style.cpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/tile_server_options.cpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/tiny_sdf.cpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/tiny_sdf.hpp
${PROJECT_SOURCE_DIR}/src/mbgl/util/token.hpp
Expand Down
2 changes: 1 addition & 1 deletion benchmark/api/query.benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class QueryBenchmark {
HeadlessFrontend frontend { { 1000, 1000 }, 1 };
Map map { frontend, MapObserver::nullObserver(),
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()),
ResourceOptions().withCachePath("benchmark/fixtures/api/cache.db").withAssetPath(".").withAccessToken("foobar") };
ResourceOptions().withCachePath("benchmark/fixtures/api/cache.db").withAssetPath(".").withApiKey("foobar") };
ScreenBox box{{ 0, 0 }, { 1000, 1000 }};
};

Expand Down
12 changes: 6 additions & 6 deletions benchmark/api/render.benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static void API_renderStill_reuse_map(::benchmark::State& state) {
HeadlessFrontend frontend { size, pixelRatio };
Map map { frontend, MapObserver::nullObserver(),
MapOptions().withMapMode(MapMode::Static).withSize(size).withPixelRatio(pixelRatio),
ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") };
ResourceOptions().withCachePath(cachePath).withApiKey("foobar") };
prepare(map);

for (auto _ : state) {
Expand All @@ -70,7 +70,7 @@ static void API_renderStill_reuse_map_formatted_labels(::benchmark::State& state
HeadlessFrontend frontend { size, pixelRatio };
Map map { frontend, MapObserver::nullObserver(),
MapOptions().withMapMode(MapMode::Static).withSize(size).withPixelRatio(pixelRatio),
ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") };
ResourceOptions().withCachePath(cachePath).withApiKey("foobar") };
prepare(map, util::read_file("benchmark/fixtures/api/style_formatted_labels.json"));

for (auto _ : state) {
Expand All @@ -83,7 +83,7 @@ static void API_renderStill_reuse_map_switch_styles(::benchmark::State& state) {
HeadlessFrontend frontend { size, pixelRatio };
Map map { frontend, MapObserver::nullObserver(),
MapOptions().withMapMode(MapMode::Static).withSize(size).withPixelRatio(pixelRatio),
ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") };
ResourceOptions().withCachePath(cachePath).withApiKey("foobar") };

for (auto _ : state) {
prepare(map, { "{}" });
Expand All @@ -100,7 +100,7 @@ static void API_renderStill_recreate_map(::benchmark::State& state) {
HeadlessFrontend frontend { size, pixelRatio };
Map map { frontend, MapObserver::nullObserver(),
MapOptions().withMapMode(MapMode::Static).withSize(size).withPixelRatio(pixelRatio),
ResourceOptions().withCachePath(cachePath).withAccessToken("foobar") };
ResourceOptions().withCachePath(cachePath).withApiKey("foobar") };
prepare(map);
frontend.render(map);
}
Expand All @@ -114,7 +114,7 @@ static void API_renderStill_recreate_map_2(::benchmark::State& state) {
Map map{frontend,
MapObserver::nullObserver(),
MapOptions().withMapMode(MapMode::Static).withSize(size).withPixelRatio(pixelRatio),
ResourceOptions().withCachePath(cachePath).withAccessToken("foobar")};
ResourceOptions().withCachePath(cachePath).withApiKey("foobar")};
prepare_map2(map);
frontend.render(map);
}
Expand All @@ -127,7 +127,7 @@ static void API_renderStill_multiple_sources(::benchmark::State& state) {
Map map{frontend,
MapObserver::nullObserver(),
MapOptions().withMapMode(MapMode::Static).withSize(size).withPixelRatio(pixelRatio),
ResourceOptions().withCachePath(cachePath).withAccessToken("foobar")};
ResourceOptions().withCachePath(cachePath).withApiKey("foobar")};
prepare(map);
auto& style = map.getStyle();
const int kSourcesCount = 50;
Expand Down
Loading