-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
206 additions
and
95 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/2.0/configuration-reference | ||
version: 2.1 | ||
|
||
orbs: | ||
# https://circleci.com/developer/orbs/orb/circleci/flutter?version=1.1.0 | ||
flutter: circleci/[email protected] | ||
android: circleci/android@2.0.3 | ||
macos: circleci/macos@2.2.0 | ||
android: circleci/android@2.1.2 | ||
macos: circleci/macos@2.3.3 | ||
|
||
commands: | ||
checkout-submodules: | ||
steps: | ||
- run: | ||
name: Checkout submodules | ||
command: | | ||
git submodule sync --recursive -- turf_equality | ||
git submodule update --recursive --init -- turf_equality | ||
|
||
inject-netrc-credentials: | ||
steps: | ||
|
@@ -62,81 +52,154 @@ commands: | |
rm secret.json | ||
fi | ||
add-mapbox-submodules-key: | ||
steps: | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "3b:cd:47:bf:57:9c:e5:36:b0:4d:5f:12:5e:d3:b3:3e" | ||
|
||
jobs: | ||
|
||
build-android: | ||
executor: | ||
name: android/android-machine | ||
resource-class: xlarge | ||
tag: 2022.03.1 | ||
parameters: | ||
workspace-path: | ||
type: string | ||
default: example/build/app/outputs/apk | ||
docker: | ||
- image: cimg/android:2022.09 | ||
resource_class: xlarge | ||
steps: | ||
- checkout | ||
- checkout-submodules | ||
- flutter/install_sdk_and_pub: | ||
flutter_version: 3.3.2 | ||
app-dir: example | ||
- run: | ||
name: ktlint | ||
working_directory: example/android | ||
command: ./gradlew ktlint | ||
- run: | ||
name: flutter format | ||
name: check flutter formatting | ||
command: ./scripts/check-format.sh | ||
- run: | ||
name: unit test | ||
command: flutter test test | ||
- install-gcloud | ||
- login-gcloud | ||
- run: | ||
name: "Build Android integration tests" | ||
working_directory: example/android | ||
command: | | ||
flutter build apk | ||
./gradlew app:assembleAndroidTest | ||
./gradlew app:assembleDebug -Ptarget=integration_test/all_test.dart -Pdart-defines="${MAPBOX_ACCESS_TOKEN_BASE64}" | ||
- persist_to_workspace: | ||
root: << parameters.workspace-path >> | ||
paths: | ||
- debug/app-debug.apk | ||
- androidTest/debug/app-debug-androidTest.apk | ||
|
||
run-android-tests-firebase: | ||
parameters: | ||
workspace-path: | ||
type: string | ||
default: example/build/app/outputs/apk | ||
docker: | ||
- image: cimg/android:2022.09 | ||
resource_class: large | ||
steps: | ||
- attach_workspace: | ||
at: << parameters.workspace-path >> | ||
- install-gcloud | ||
- login-gcloud | ||
- run: | ||
name: "Run Android integration tests on Firebase" | ||
working_directory: example | ||
no_output_timeout: 20m | ||
command: | | ||
gcloud firebase test android run --type instrumentation \ | ||
--app build/app/outputs/apk/debug/app-debug.apk \ | ||
--test build/app/outputs/apk/androidTest/debug/app-debug-androidTest.apk \ | ||
--app << parameters.workspace-path >>/debug/app-debug.apk \ | ||
--test << parameters.workspace-path >>/androidTest/debug/app-debug-androidTest.apk \ | ||
--timeout 5m \ | ||
--results-dir=result_dir \ | ||
--use-orchestrator \ | ||
--num-flaky-test-attempts 3 | ||
--num-flaky-test-attempts 3 | ||
build-ios: | ||
parameters: | ||
workspace-path: | ||
type: string | ||
default: example/build/output | ||
executor: macos-xcode-latest | ||
steps: | ||
- checkout | ||
- checkout-submodules | ||
- inject-netrc-credentials | ||
- add-mapbox-submodules-key | ||
- flutter/install_sdk_and_pub: | ||
flutter_version: 3.3.2 | ||
app-dir: example | ||
- flutter/install_ios_pod: | ||
app-dir: example | ||
- run: | ||
name: swiftlint | ||
working_directory: ios | ||
command: brew install swiftlint; swiftlint lint --strict | ||
- run: | ||
name: "Build flutter wrapper for iOS" | ||
working_directory: example | ||
command: flutter build ios --simulator --no-codesign | ||
- run: | ||
name: unit test | ||
command: flutter test test | ||
# - install-gcloud | ||
# - login-gcloud | ||
# - run-firebase-benchmark-ios | ||
|
||
- run: | ||
name: "Build iOS integration tests" | ||
command: | | ||
bundle exec fastlane update_code_signing | ||
pushd example | ||
# required to init configs that pass environment variables to fastlane later | ||
flutter build ios --config-only integration_test/all_test.dart \ | ||
--release --dart-define=ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN} | ||
flutter build ios integration_test/all_test.dart \ | ||
--release --dart-define=ACCESS_TOKEN=${MAPBOX_ACCESS_TOKEN} | ||
popd # to repo root | ||
bundle exec fastlane build_examples_tests | ||
- persist_to_workspace: | ||
root: << parameters.workspace-path >> | ||
paths: | ||
- build_products.zip | ||
|
||
run-ios-tests-firebase: | ||
parameters: | ||
workspace-path: | ||
type: string | ||
default: example/build/output | ||
executor: macos-xcode-latest | ||
steps: | ||
- attach_workspace: | ||
at: << parameters.workspace-path >> | ||
- install-gcloud | ||
- login-gcloud | ||
- run: | ||
name: "Run iOS integration tests on Firebase" | ||
no_output_timeout: 20m | ||
command: | | ||
gcloud firebase test ios run \ | ||
--test << parameters.workspace-path >>/build_products.zip \ | ||
--device model=iphone8,version=15.7 | ||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- build-android | ||
- run-android-tests-firebase: | ||
requires: | ||
- build-android | ||
- build-ios | ||
- run-ios-tests-firebase: | ||
requires: | ||
- build-ios | ||
|
||
executors: | ||
macos-xcode-latest: | ||
resource_class: large | ||
macos: | ||
xcode: 13.3.0 | ||
xcode: 14.1.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +0,0 @@ | ||
[submodule "codegen/vendor/mapbox-maps-stylegen"] | ||
path = codegen/vendor/mapbox-maps-stylegen | ||
url = [email protected]:mapbox/mapbox-maps-stylegen.git | ||
[submodule "turf_equality"] | ||
path = turf_equality | ||
url = [email protected]:dartclub/turf_equality.git | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
## 0.3.0 | ||
* Align Kotlin version 1.5.31 with the Maps SDK. | ||
|
||
## 0.2.0 | ||
|
||
* Rename `MapView` to `MapWidget`. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
TODO: Add your license here. | ||
### License | ||
|
||
Mapbox Maps Flutter Plugin | ||
|
||
Copyright © 2022 Mapbox | ||
|
||
All rights reserved. | ||
|
||
Mapbox Maps Flutter Plugin must be used according to the Mapbox Terms of Service. This license allows developers with a current active Mapbox account to use and modify the Mapbox Maps Flutter Plugin. Developers may modify the Mapbox Maps Flutter Plugin code so long as the modifications do not change or interfere with marked portions of the code related to billing, accounting, and anonymized data collection. The Mapbox Maps Flutter Plugin sends anonymized location and usage data, which Mapbox uses for fixing bugs and errors, accounting, and generating aggregated anonymized statistics. This license terminates automatically if a user no longer has an active Mapbox account. | ||
|
||
For the full license terms, please see the Mapbox Terms of Service at https://www.mapbox.com/legal/tos/ | ||
|
||
## Additional Mapbox Maps Flutter Plugin licenses | ||
|
||
[enum_to_string](https://pub.dev/packages/enum_to_string). | ||
|
||
License: [MIT License](https://pub.dev/packages/enum_to_string/license) | ||
|
||
=========================================================================== | ||
|
||
[flutter_plugin_android_lifecycle](https://pub.dev/packages/enum_to_string). | ||
|
||
License: [BSD-3-Clause](https://pub.dev/packages/flutter_plugin_android_lifecycle/license) | ||
|
||
=========================================================================== | ||
|
||
[turf](https://pub.dev/packages/turf). | ||
|
||
License: [MIT License](https://pub.dev/packages/turf/license) | ||
|
||
=========================================================================== | ||
|
||
[typed_data](https://pub.dev/packages/typed_data). | ||
|
||
License: [BSD-3-Clause](https://pub.dev/packages/typed_data/license) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,49 @@ | ||
# Mapbox Maps Flutter Plugin for Mapbox Maps SDK v10 | ||
|
||
This Mapbox Maps Flutter Plugin allows to show embedded interactive, thoroughly customizable maps inside a Flutter widget, powered by vector tiles and OpenGL(Android)/Metal(iOS). | ||
For the Android integration, it uses [Mapbox Maps Flutter Plugin for Android v10](https://github.com/mapbox/mapbox-maps-android). For the iOS integration, it uses [Mapbox Maps Flutter Plugin for iOS v10](https://github.com/mapbox/mapbox-maps-ios). Web is not supported yet. This project only supports a subset of the API exposed by these libraries. | ||
# Mapbox Maps SDK Flutter Plugin | ||
|
||
The Mapbox Maps SDK Flutter Plugin is an officially developed solution from Mapbox that enables use of our latest Maps SDK product (v10.9.0). It is currently in beta, but can be used in production. The plugin allows developers to embed highly customized maps using a Flutter widget on Android and iOS. | ||
|
||
Web and desktop are not supported. | ||
|
||
Contributions welcome! | ||
|
||
## Supported API | ||
|
||
| Feature | Android | iOS | | ||
| ------ | ------ | ----- | | ||
| Style | :white_check_mark: | :white_check_mark: | | ||
| Camera position | :white_check_mark: | :white_check_mark: | | ||
| Camera animations | :white_check_mark: | :white_check_mark: | | ||
| Events | :white_check_mark: | :white_check_mark: | | ||
| Gestures | :white_check_mark: | :white_check_mark: | | ||
| User Location | :white_check_mark: | :white_check_mark: | | ||
| Circle Layer | :white_check_mark: | :white_check_mark: | | ||
| Fill Layer | :white_check_mark: | :white_check_mark: | | ||
| Fill extrusion Layer | :white_check_mark: | :white_check_mark: | | ||
| Line Layer | :white_check_mark: | :white_check_mark: | | ||
| Circle Layer | :white_check_mark: | :white_check_mark: | | ||
| Raster Layer | :white_check_mark: | :white_check_mark: | | ||
| Symbol Layer | :white_check_mark: | :white_check_mark: | | ||
| Hillshade Layer | :white_check_mark: | :white_check_mark: | | ||
| Heatmap Layer | :white_check_mark: | :white_check_mark: | | ||
| Sky Layer | :white_check_mark: | :white_check_mark: | | ||
| GeoJson Source | :white_check_mark: | :white_check_mark: | | ||
| Image Source | :white_check_mark: | :white_check_mark: | | ||
| Vector Source | :white_check_mark: | :white_check_mark: | | ||
| Raster Source | :white_check_mark: | :white_check_mark: | | ||
| Rasterdem Source | :white_check_mark: | :white_check_mark: | | ||
| Circle Annotations | :white_check_mark: | :white_check_mark: | | ||
| Point Annotations | :white_check_mark: | :white_check_mark: | | ||
| Line Annotations | :white_check_mark: | :white_check_mark: | | ||
| Fill Annotations | :white_check_mark: | :white_check_mark: | | ||
| Offline | :x: | :x: | | ||
| Viewport | :x: | :x: | | ||
| Style DSL | :x: | :x: | | ||
| Expression DSL | :x: | :x: | | ||
| View Annotations | :x: | :x: | | ||
|
||
## Requirements | ||
|
||
The Maps Flutter Plugin is compatible with applications that are: | ||
The Maps Flutter Plugin is compatible with applications: | ||
|
||
- Deployed on iOS 11 or higher | ||
- Built using the Android SDK 21 or higher | ||
|
@@ -77,7 +115,7 @@ dependencies: | |
mapbox_maps: | ||
git: | ||
url: [email protected]:mapbox/mapbox-maps-flutter.git | ||
ref: 0.2.0 | ||
ref: 0.3.0 | ||
``` | ||
|
||
### Configure permissions | ||
|
@@ -290,6 +328,8 @@ Platform docs : [Android](https://docs.mapbox.com/android/maps/guides/user-inter | |
|
||
Users interacting with the map in your application can explore the map by performing standard gestures. | ||
|
||
You can pass custom `MapWidget.gestureRecognizers` to control which gestures | ||
are handled by the platform view. | ||
You can retrieve or update the `GestureSettings` using `MapboxMap.gestures`. | ||
|
||
You can observe gesture events using `MapWidget.onTapListener`, `MapWidget.onLongTapListener`, `MapWidget.onScrollListener`. | ||
|
||
|
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
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
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
Oops, something went wrong.