diff --git a/.github/workflows/flutter_beta.yml b/.github/workflows/flutter_beta.yml index 1949141c7..b1674f344 100644 --- a/.github/workflows/flutter_beta.yml +++ b/.github/workflows/flutter_beta.yml @@ -25,7 +25,7 @@ jobs: with: channel: ${{ env.FLUTTER_CHANNEL }} cache: true - - run: flutter pub get + - uses: bluefireteam/melos-action@v3 - name: Build example APK run: flutter build apk - name: Upload apk as artifact @@ -46,10 +46,10 @@ jobs: with: channel: ${{ env.FLUTTER_CHANNEL }} cache: true + - uses: bluefireteam/melos-action@v3 - uses: maxim-lobanov/setup-cocoapods@v1 with: podfile-path: example/ios/Podfile.lock - - run: flutter pub get - name: Build iOS package run: flutter build ios --simulator - name: Upload Runner.app as artifact @@ -70,6 +70,6 @@ jobs: with: channel: ${{ env.FLUTTER_CHANNEL }} cache: true - - run: flutter pub get + - uses: bluefireteam/melos-action@v3 - name: Build web run: flutter build web diff --git a/.github/workflows/flutter_ci.yml b/.github/workflows/flutter_ci.yml index 5dc45682a..88f9af6fd 100644 --- a/.github/workflows/flutter_ci.yml +++ b/.github/workflows/flutter_ci.yml @@ -16,8 +16,9 @@ jobs: - uses: subosito/flutter-action@v2 with: cache: true + - uses: bluefireteam/melos-action@v3 - name: Lint analysis - run: dart format --set-exit-if-changed . + run: melos format --set-exit-if-changed . lint: name: "Static code analysis" @@ -27,13 +28,9 @@ jobs: - uses: subosito/flutter-action@v2 with: cache: true - - run: flutter pub get - - run: | - cd scripts - flutter pub get - cd .. + - uses: bluefireteam/melos-action@v3 - name: Lint analysis - run: flutter analyze + run: melos analyze build-android: name: "Build Android apk" @@ -51,12 +48,12 @@ jobs: with: flutter-version: ${{ matrix.sdk }} cache: true + - uses: bluefireteam/melos-action@v3 - uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' cache: 'gradle' - - run: flutter pub get - name: Build example APK run: flutter build apk - name: Upload apk as artifact @@ -82,10 +79,10 @@ jobs: with: flutter-version: ${{ matrix.sdk }} cache: true + - uses: bluefireteam/melos-action@v3 - uses: maxim-lobanov/setup-cocoapods@v1 with: podfile-path: example/ios/Podfile.lock - - run: flutter pub get - name: Build iOS package run: flutter build ios --simulator - name: Upload Runner.app as artifact @@ -111,6 +108,6 @@ jobs: with: flutter-version: ${{ matrix.sdk }} cache: true - - run: flutter pub get + - uses: bluefireteam/melos-action@v3 - name: Build web run: flutter build web diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 10cb4f515..01cfd7236 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,4 +22,4 @@ jobs: needs: [publish_maplibre_gl_platform_interface, publish_maplibre_gl_web] uses: ./.github/workflows/publish-single.yml with: - working-directory: . + working-directory: maplibre_gl diff --git a/.gitignore b/.gitignore index d30bd0311..28c0088a5 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ migrate_working_dir/ .flutter-plugins-dependencies .pub-cache/ .pub/ -/build/ +/example/build/ pubspec.lock # Coverage @@ -43,9 +43,11 @@ app.*.symbols app.*.map.json # Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release +android/app/debug +android/app/profile +android/app/release # Misc -GeneratedPluginRegistrant.swift \ No newline at end of file +GeneratedPluginRegistrant.swift + +pubspec_overrides.yaml \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 36392ce4b..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,494 +0,0 @@ -## 0.20.0 - -A lot of files/classes have been renamed and moved around in this release. -If you notice any build errors, please make sure to run `flutter clean`. - -### Breaking changes - -* All Dart enums have been migrated from mixed cases to lower camelcase - according to the `camel_case_types` lint rule. -* Move `MapLibreStyles` to the main `maplibre_gl` package. You can now use the - demo style without adding `maplibre_gl_platform_interface` as a dependency. -* Updated maplibre-native for ios to v6.5.0. This introduces the new - iOS Metal renderer and the OpenGL ES renderer now uses OpenGL ES 3.0. Only - iOS Devices with an Apple A7 GPU or later are supported onwards. See the - [maplibre-native changelog](https://github.com/maplibre/maplibre-native/blob/main/platform/ios/CHANGELOG.md#600) - for more information. -* Updated maplibre-native for android to v11.0.0. This version uses - OpenGL ES 3.0. See the - [maplibre-native changelog](https://github.com/maplibre/maplibre-native/blob/main/platform/android/CHANGELOG.md#1100) - for more information. -* Renamed the method channel to `plugins.flutter.io/maplibre_gl_*` in all - packages. -* Renamed "Maplibre" to "MapLibre" to be in line with maplibre-native - (affects for example the classes `MaplibreMap` and `MaplibreMapController`). - -### Changes - -* Added support for Swift Package Manager usage on iOS. -* Migrated main iOS plugin class from Objective-C to Swift. -* Renamed iOS plugin classes from `Mapbox` to `MapLibre`. - -**Full Changelog**: -[v0.19.0+2...v0.20.0](https://github.com/maplibre/flutter-maplibre-gl/compare/v0.19.0+2...v0.20.0) - -## 0.19.0 - -This is the first version where all packages are published on pub.dev. Please -use the `maplibre_gl` package directly from pub.dev from now on. Check the -`README` documentation on how to include it in your project. - -### Changes - -* Bump min Dart SDK to 3.0.0 (this was already implicitly required by transitive - dependencies) -* Prepare all packages for publishing - to [pub.dev](https://pub.dev/packages/maplibre_gl) -* Add support for - the [Fill Extrusion layer](https://maplibre.org/maplibre-style-spec/layers/#fill-extrusion) -* Add support for - the [Heatmap layer](https://maplibre.org/maplibre-style-spec/layers/#heatmap) -* Update documentation -* (android) Bump Android `compileSdkVersion` to 34 -* (iOS) Add `iosLongClickDuration` as parameter to customize the long click - duration. -* (web) Loosen the dependency constraint of [js](https://pub.dev/packages/js) to - allow `0.6.x` and `0.7.x`. - -### Bug Fixes - -* (android) Fix support for newer gradle versions (Add support for Gradle/AGP - namespace configuration) -* (android) Fix `NullPointerException` when changing the visibility of a layer ( - layer#setVisibility) -* (android) Fix enum parsing for the `onCameraTracking` callback -* (iOS) Fix tap detection on features if the feature id is null -* (web) Fix flickering when the style takes time to load - -**Full Changelog**: -[0.18.0...v0.19.0](https://github.com/maplibre/flutter-maplibre-gl/compare/0.18.0...v0.19.0) - -## 0.18.0 - -### Breaking Change: - -Already since 0.17.0, developers do not need to adapt their Podfile for iOS apps -anymore as it was previously described in the Readme. Developers who previously -added these lines should remove them, since not removing these lines may cause a -build failure on iOS. (This change actually already landed in 0.17.0, but it may -not have been sufficiently clear that not removing these lines might break -builds). - -### Other Changes: - -* new feature: set arbitrary layer properties by @m0nac0 - in [#303](https://github.com/maplibre/flutter-maplibre-gl/pull/303) -* Update release process by @m0nac0 - in [#315](https://github.com/maplibre/flutter-maplibre-gl/pull/315) -* Add workflows for automated publishing to pub.dev by @m0nac0 - in [#328](https://github.com/maplibre/flutter-maplibre-gl/pull/328) -* Fix example app pubspec by @m0nac0 - in [#329](https://github.com/maplibre/flutter-maplibre-gl/pull/329) -* Updated location plugin version for example app by @varunlohade - in [#334](https://github.com/maplibre/flutter-maplibre-gl/pull/334) -* Housekeeping: Improve docs and update outdated references to point to MapLibre - by @m0nac0 in [#330](https://github.com/maplibre/flutter-maplibre-gl/pull/330) - -**Full Changelog**: -[0.17.0...0.18.0](https://github.com/maplibre/flutter-maplibre-gl/compare/0.17.0...0.18.0) - -## 0.17.0 - -* **Repository transfer**: The project repository was transferred to the - MapLibre GitHub organization. More information - at [#221](https://github.com/maplibre/flutter-maplibre-gl/issues/221) -* Developers do not need to adapt their Podfile for iOS apps anymore as it was - previously described in the - Readme. [#278](https://github.com/maplibre/flutter-maplibre-gl/pull/278) - -### Breaking Change: - -* `maplibre_gl/mapbox_gl.dart` was renamed to `maplibre_gl/maplibre_gl.dart`. - You can do a replace-all from `import 'package:maplibre_gl/mapbox_gl.dart';` - to `import 'package:maplibre_gl/maplibre_gl.dart';` -* `useDelayedDisposal` was removed since its now fixed - in [#259](https://github.com/maplibre/flutter-maplibre-gl/pull/259) -* `useHybridCompositionOverride` was removed since it was added in the following - fix: [#203](https://github.com/maplibre/flutter-maplibre-gl/pull/203) and we - reverted - the fix and used another approach to fix the actual issue. -* The default for `myLocationRenderMode` was changed from `COMPASS` to `NORMAL` - in [#244](https://github.com/maplibre/flutter-maplibre-gl/pull/244), since the - previous default value of `COMPASS` implicitly enables displaying the location - on iOS, which could crash apps that didn't want to display the device - location. If you want to continue to use `MyLocationRenderMode.COMPASS`, - please explicitly specify it in the constructor like this: - -```dart -@override -Widget build() { - return MapLibreMap( - myLocationRenderMode: MyLocationRenderMode.COMPASS, - // ... - ); -} -``` - -* The old api `registerWith` was removed from the MapboxMapsPlugin.java, since - there is no need for that. -* The `minSdkVersion` was bumped to at least 21 now, since the native android - sdk constraint expect that. -* Changed the minimum Dart version from sdk: `2.12.0` to `2.14.0` - in `maplibre_gl_platform_interface/pubspec.yaml`. - -### Further changes - -Note: This list only contains a subset of all contributions, notably excluding -those that e.g. only affect the GitHub Actions CI or documentation. See the link -at the end for a full changelog. - -* feat: add support for reading style json from file in ios by @TimAlber - in [#132](https://github.com/maplibre/flutter-maplibre-gl/pull/132) -* Add podspecs in correct Cocoapods layout by @kuhnroyal - in [#128](https://github.com/maplibre/flutter-maplibre-gl/pull/128) -* fix: fix the queryRenderedFeatures code on iOS by @TimAlber - in [#137](https://github.com/maplibre/flutter-maplibre-gl/pull/137) -* feat: Set layer visibility by @m0nac0 - in [#138](https://github.com/maplibre/flutter-maplibre-gl/pull/138) -* feat: add support for changing the receiver’s viewport to fit given bounds by - @TimAlber in [#133](https://github.com/maplibre/flutter-maplibre-gl/pull/133) -* Change feature JSON encoding from .ascii to .utf8 by @SunBro-Marko - in [#142](https://github.com/maplibre/flutter-maplibre-gl/pull/142) -* web: implement setCameraBounds by @m0nac0 - in [#145](https://github.com/maplibre/flutter-maplibre-gl/pull/145) -* Use offical maplibre-gl.js and add README info by @Robbendebiene - in [#163](https://github.com/maplibre/flutter-maplibre-gl/pull/163) -* android: adding tileSize to raster source by @mariusvn - in [#166](https://github.com/maplibre/flutter-maplibre-gl/pull/166) -* Readme: document git default values for codespaces by @m0nac0 - in [#170](https://github.com/maplibre/flutter-maplibre-gl/pull/170) -* query source features by @Grodien - in [#154](https://github.com/maplibre/flutter-maplibre-gl/pull/154) -* Trimming styleString to simplify the JSON detection by @mariusvn - in [#175](https://github.com/maplibre/flutter-maplibre-gl/pull/175) -* Fix getVisibleRegion method by @BartoszStasiurka - in [#179](https://github.com/maplibre/flutter-maplibre-gl/pull/179) -* Reenable textureMode which was disabled in f8b2d1 by @maxammann - in [#194](https://github.com/maplibre/flutter-maplibre-gl/pull/194) -* android: Bump MapLibre SDK to 9.6.0 & OkHttp to 4.9.3 by @mariusvn - in [#184](https://github.com/maplibre/flutter-maplibre-gl/pull/184) -* Added getSourceIds to the controller by @mariusvn - in [#197](https://github.com/maplibre/flutter-maplibre-gl/pull/197) -* Moved EventChannel creation in the downloadOfflineRegion method by @mariusvn - in [#205](https://github.com/maplibre/flutter-maplibre-gl/pull/205) -* Fix crash android dispose nullpointerdereference by @GaelleJoubert - in [#203](https://github.com/maplibre/flutter-maplibre-gl/pull/203) -* Migrate links in README, pubspec to MapLibre by @kuhnroyal - in [#224](https://github.com/maplibre/flutter-maplibre-gl/pull/224) -* Update LICENSE file by @mariusvn - in [#230](https://github.com/maplibre/flutter-maplibre-gl/pull/230) -* upgrade dependency image by @m0nac0 - in [#248](https://github.com/maplibre/flutter-maplibre-gl/pull/248) -* fix-example-app by @JulianBissekkou - in [#261](https://github.com/maplibre/flutter-maplibre-gl/pull/261) -* 162-animate-camera-on-web-fix by @JulianBissekkou - in [#254](https://github.com/maplibre/flutter-maplibre-gl/pull/254) -* 243-fix-crash-when-no-location-permission by @JulianBissekkou - in [#244](https://github.com/maplibre/flutter-maplibre-gl/pull/244) -* 182-disposal-null-ref-crash by @JulianBissekkou - in [#259](https://github.com/maplibre/flutter-maplibre-gl/pull/259) -* New android sdk version by @stefanschaller - in [#270](https://github.com/maplibre/flutter-maplibre-gl/pull/270) -* 250-change-language-fixes by @stefanschaller - in [#275](https://github.com/maplibre/flutter-maplibre-gl/pull/275) -* upgrade-ios-version by @JulianBissekkou - in [#277](https://github.com/maplibre/flutter-maplibre-gl/pull/277) -* Simplify iOS usage instructions and example podfile by @m0nac0 - in [#278](https://github.com/maplibre/flutter-maplibre-gl/pull/278) -* Add opportunity to use map in widget tests by @ManoyloK - in [#281](https://github.com/maplibre/flutter-maplibre-gl/pull/281) -* fix-layers-prod-build by @stefanschaller - in [#291](https://github.com/maplibre/flutter-maplibre-gl/pull/291) -* Fix the codespace by upgrading the docker image by @ouvreboite - in [#297](https://github.com/maplibre/flutter-maplibre-gl/pull/297) -* Add `updateImageSource`. by @CaviarChen - in [#271](https://github.com/maplibre/flutter-maplibre-gl/pull/271) -* fix "unexpected null value" error when onStyleLoadedCallback is null by - @m0nac0 in [#307](https://github.com/maplibre/flutter-maplibre-gl/pull/307) -* attributionButtonPosition for web by @ouvreboite - in [#304](https://github.com/maplibre/flutter-maplibre-gl/pull/304) - -**Full Changelog**: -https://github.com/maplibre/flutter-maplibre-gl/compare/0.16.0...0.17.0 - -## 0.16.0, Jun 28, 2022 - -* cherry-picked all commits from upstream up - to [https://github.com/flutter-mapbox-gl/maps/commit/3496907955cd4b442e4eb905d67e8d46692174f1), - including up to release 0.16.0 from upstream -* updated MapLibre GL JS for web - -## 0.15.1, May 24, 2022 - -* cherry-picked all commits from upstream up - to [upstream release 0.15.0](https://github.com/flutter-mapbox-gl/maps/releases/tag/0.15.0) -* improved documentation -* betted adapted the example app to MapLibre -* hide logo on Android/iOS to match web - -## 0.15.0, Oct 26, 2021 - -* Fix bug when changing line color (see #448) by @vberthet - in [#15](https://github.com/m0nac0/flutter-maplibre-gl/pull/15) -* Remove unnecessary imports by @m0nac0 - in [#34](https://github.com/m0nac0/flutter-maplibre-gl/pull/34) -* Update example with Flutter 2.5.3 by @kuhnroyal - in [#35](https://github.com/m0nac0/flutter-maplibre-gl/pull/35) -* CI: Use separate scheduled pipeline for Flutter beta builds by @kuhnroyal - in [#28](https://github.com/m0nac0/flutter-maplibre-gl/pull/28) -* Null safety (cherry-pick from upstream) by @m0nac0 - in [#31](https://github.com/m0nac0/flutter-maplibre-gl/pull/31) -* [web] add missing removeLines, removeCircles and removeFills (cherry-pick - tobrun#622) by @m0nac0 - in [#32](https://github.com/m0nac0/flutter-maplibre-gl/pull/32) -* Replace style string in local style example by @m0nac0 - in [#33](https://github.com/m0nac0/flutter-maplibre-gl/pull/33) -* [web] add getSymbolLatLng and getLineLatLngs by @m0nac0 - in [#37](https://github.com/m0nac0/flutter-maplibre-gl/pull/37) - -## 0.14.0 - -### Breaking changes: - -* Remove access token, update libraries, replace example - styles [#25](https://github.com/m0nac0/flutter-maplibre-gl/pull/25) (also - see [#21](https://github.com/m0nac0/flutter-maplibre-gl/issues/21)) - * The parameter `accessToken` of class `MaplibreMap` was removed. If you - want to continue using a tile provider that requires an API key, specify - that key directly in the URL of the tile source ( - see [https://github.com/m0nac0/flutter-maplibre-gl#tile-sources-requiring-an-api-key](https://github.com/m0nac0/flutter-maplibre-gl#tile-sources-requiring-an-api-key)) - * The built-in constants for specific styles were also removed. You can - continue using these styles by using the styles' URL - -### Other changes: - -* Remove warning about missing access token on - Android [#22](https://github.com/m0nac0/flutter-maplibre-gl/pull/22) -* Example: use maplibre styles and add new demo - style [#23](https://github.com/m0nac0/flutter-maplibre-gl/pull/23) -* Add about button to example - app [#26](https://github.com/m0nac0/flutter-maplibre-gl/pull/26) -* various improvements to the CI -* fixed formatting for some files that were not correctly formatted - -## 0.13.0, Oct 6, 2021 - -πŸŽ‰ The first release of flutter-maplibre-gl with the complete transition to -MapLibre libraries. πŸŽ‰ - -Further improvements: - -* Update to MapLibre-Android-SDK 9.4.2 -* Update to MapLibre-iOS-SDK 5.12.0 -* Fix onUserLocationUpdated not firing on - android [#14](https://github.com/m0nac0/flutter-maplibre-gl/pull/14) -* Add speed to - UserLocation [#11](https://github.com/m0nac0/flutter-maplibre-gl/pull/11) -* Fix queryRenderedFeaturesInRect for - iOS [#10](https://github.com/m0nac0/flutter-maplibre-gl/pull/10) - -### Changes cherry-picked/ported from tobrun/flutter-mapbox-gl:0.12.0 - -* Batch creation/removal for circles, fills and - lines [#576](https://github.com/tobrun/flutter-mapbox-gl/pull/576) -* Dependencies: updated image - package [#598](https://github.com/tobrun/flutter-mapbox-gl/pull/598) -* Improve description to enable location - features [#596](https://github.com/tobrun/flutter-mapbox-gl/pull/596) -* Fix feature manager on release - build [#593](https://github.com/tobrun/flutter-mapbox-gl/pull/593) -* Emit onTap only for the feature above the - others [#589](https://github.com/tobrun/flutter-mapbox-gl/pull/589) -* Add annotationOrder to - web [#588](https://github.com/tobrun/flutter-mapbox-gl/pull/588) - -### Changes cherry-picked/ported from tobrun/flutter-mapbox-gl:0.11.0 - -* Fixed issues caused by new android - API [#544](https://github.com/tobrun/flutter-mapbox-gl/pull/544) -* Add option to set maximum offline tile - count [#549](https://github.com/tobrun/flutter-mapbox-gl/pull/549) -* Fixed web build failure due to http package - upgrade [#550](https://github.com/tobrun/flutter-mapbox-gl/pull/550) -* Update OfflineRegion/OfflineRegionDefinition interfaces, synchronize with iOS - and Android [#545](https://github.com/tobrun/flutter-mapbox-gl/pull/545) -* Fix Mapbox GL JS CSS embedding on - web [#551](https://github.com/tobrun/flutter-mapbox-gl/pull/551) -* Update Podfile to fix iOS - CI [#565](https://github.com/tobrun/flutter-mapbox-gl/pull/565) -* Update deprecated patterns to fix CI static - analysis [#568](https://github.com/tobrun/flutter-mapbox-gl/pull/568) -* Add setOffline method on - Android [#537](https://github.com/tobrun/flutter-mapbox-gl/pull/537) -* Add batch mode of screen - locations [#554](https://github.com/tobrun/flutter-mapbox-gl/pull/554) -* Define which annotations consume the tap - events [#575](https://github.com/tobrun/flutter-mapbox-gl/pull/575) -* Remove failed offline region - downloads [#583](https://github.com/tobrun/flutter-mapbox-gl/pull/583) - -## Below is the original changelog of the tobrun/flutter-mapbox-gl project, before the fork. - -## 0.10.0, February 12, 2020 - -* Merge offline - regions [#532](https://github.com/tobrun/flutter-mapbox-gl/pull/532) -* Update offline region - metadata [#530](https://github.com/tobrun/flutter-mapbox-gl/pull/530) -* Added web support for - fills [#501](https://github.com/tobrun/flutter-mapbox-gl/pull/501) -* Support styleString as "Documents directory/Temporary - directory" [#520](https://github.com/tobrun/flutter-mapbox-gl/pull/520) -* Use offline region - ids [#491](https://github.com/tobrun/flutter-mapbox-gl/pull/491) -* Ability to define annotation layer - order [#523](https://github.com/tobrun/flutter-mapbox-gl/pull/523) -* Clear fills API [#527](https://github.com/tobrun/flutter-mapbox-gl/pull/527) -* Add heading to UserLocation and expose UserLocation - type [#522](https://github.com/tobrun/flutter-mapbox-gl/pull/522) -* Patch addFill with data - parameter [#524](https://github.com/tobrun/flutter-mapbox-gl/pull/524) -* Fix style annotation is not deselected on - iOS [#512](https://github.com/tobrun/flutter-mapbox-gl/pull/512) -* Update tracked camera position in - camera#onIdle [#500](https://github.com/tobrun/flutter-mapbox-gl/pull/500) -* Fix iOS implementation of map#toLatLng on - iOS [#495](https://github.com/tobrun/flutter-mapbox-gl/pull/495) -* Migrate to new Android flutter plugin - architecture [#488](https://github.com/tobrun/flutter-mapbox-gl/pull/488) -* Update readme to fix - UnsatisfiedLinkError [#422](https://github.com/tobrun/flutter-mapbox-gl/pull/442) -* Improved Image Source - Support [#469](https://github.com/tobrun/flutter-mapbox-gl/pull/469) -* Avoid white space when resizing map on - web [#474](https://github.com/tobrun/flutter-mapbox-gl/pull/474) -* Allow MapboxMap() to override Widget - Key. [#475](https://github.com/tobrun/flutter-mapbox-gl/pull/475) -* Offline region - feature [#336](https://github.com/tobrun/flutter-mapbox-gl/pull/336) -* Fix iOS symbol tapped - interaction [#443](https://github.com/tobrun/flutter-mapbox-gl/pull/443) - -## 0.9.0, October 24. 2020 - -* Fix data parameter for addLine and - addCircle [#388](https://github.com/tobrun/flutter-mapbox-gl/pull/388) -* Re-enable attribution on - Android [#383](https://github.com/tobrun/flutter-mapbox-gl/pull/383) -* Upgrade annotation plugin to - v0.9 [#381](https://github.com/tobrun/flutter-mapbox-gl/pull/381) -* Breaking change: CameraUpdate.newLatLngBounds() now supports setting different - padding values for left, top, right, bottom with default of 0 for all. - Implementations using the old approach with only one padding value for all - edges have to be - updated. [#382](https://github.com/tobrun/flutter-mapbox-gl/pull/382) -* web:ignore myLocationTrackingMode if myLocationEnabled is - false [#363](https://github.com/tobrun/flutter-mapbox-gl/pull/363) -* Add methods to access - projection [#380](https://github.com/tobrun/flutter-mapbox-gl/pull/380) -* Add fill API support for Android and - iOS [#49](https://github.com/tobrun/flutter-mapbox-gl/pull/49) -* Listen to OnUserLocationUpdated to provide user location to - app [#237](https://github.com/tobrun/flutter-mapbox-gl/pull/237) -* Correct integration in Activity lifecycle on - Android [#266](https://github.com/tobrun/flutter-mapbox-gl/pull/266) -* Add support for custom font stackn in symbol - options [#359](https://github.com/tobrun/flutter-mapbox-gl/pull/359) -* Fix memory leak on iOS caused by strong self - reference [#370](https://github.com/tobrun/flutter-mapbox-gl/pull/370) -* Basic ImageSource - Support [#409](https://github.com/tobrun/flutter-mapbox-gl/pull/409) -* Get meters per pixel at - latitude [#416](https://github.com/tobrun/flutter-mapbox-gl/pull/416) -* Fix - onStyleLoadedCallback [#418](https://github.com/tobrun/flutter-mapbox-gl/pull/418) - -## 0.8.0, August 22, 2020 - -- implementation of feature - querying [#177](https://github.com/tobrun/flutter-mapbox-gl/pull/177) -- Batch create/delete of - symbols [#279](https://github.com/tobrun/flutter-mapbox-gl/pull/279) -- Add multi map - support [#315](https://github.com/tobrun/flutter-mapbox-gl/pull/315) -- Fix OnCameraIdle not being - invoked [#313](https://github.com/tobrun/flutter-mapbox-gl/pull/313) -- Fix android zIndex symbol - option [#312](https://github.com/tobrun/flutter-mapbox-gl/pull/312) -- Set dependencies from - git [#319](https://github.com/tobrun/flutter-mapbox-gl/pull/319) -- Add line#getGeometry and - symbol#getGeometry [#281](https://github.com/tobrun/flutter-mapbox-gl/pull/281) - -## 0.7.0, June 6, 2020 - -* Introduction of mapbox_gl_platform_interface library -* Introduction of mapbox_gl_web library -* Integrate web support through mapbox-gl-js -* Add icon-allow-overlap configurations - -## 0.0.6, May 31, 2020 - -* Update mapbox depdendency to 9.2.0 (android) and 5.6.0 (iOS) -* Long press handlers for both iOS as Android -* Change default location tracking to none -* OnCameraIdle listener support -* Add image to style -* Add animation duration to animateCamera -* Content insets -* Visible region support on iOS -* Numerous bug fixes - -## 0.0.5, December 21, 2019 - -* iOS support for annotation extensions (circle, symbol, line) -* Update SDK to 8.5.0 (Android) and 5.5.0 (iOS) -* Integrate style loaded callback api -* Add Map click event (iOS) -* Cache management API (Android/iOS) -* Various fixes to showing user location and configurations (Android/iOS) -* Last location API (Android) -* Throttle max FPS of user location component (Android) -* Fix for handling permission handling of the test application (Android) -* Support for loading symbol images from assets (iOS/Android) - -## v0.0.4, Nov 2, 2019 - -* Update SDK to 8.4.0 (Android) and 5.4.0 (iOS) -* Add support for sideloading offline maps (Android/iOS) -* Add user tracking mode (iOS) -* Invert compassView.isHidden logic (iOS) -* Specific swift version (iOS) - -## v0.0.3, Mar 30, 2019 - -* Camera API (iOS) -* Line API (Android) -* Update codebase to AndroidX -* Update Mapbox Maps SDK for Android to v7.3.0 - -## v0.0.2, Mar 23, 2019 - -* Support for iOS -* Migration to embedded Android and iOS SDK View system -* Style URL API -* Style JSON API (Android) -* Gesture support -* Gesture restrictions (Android) -* Symbol API (Android) -* Location component (Android) -* Camera API (Android) - -## v0.0.1, May 7, 2018 - -* Initial Android surface rendering POC diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 120000 index 000000000..5474010a9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +maplibre_gl/CHANGELOG.md \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index daaf99dfd..000000000 --- a/LICENSE +++ /dev/null @@ -1,181 +0,0 @@ -flutter-maplibre-gl Copyright (c) 2023, MapLibre contributors. -flutter-maplibre-gl Copyright (c) 2021, m0nac0. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- -This project was forked from (and therefore contains a lot of modified and unmodified code from) https://github.com/tobrun/flutter-mapbox-gl which at the time of the fork (March 6th, 2021) contained the following LICENSE file: -(Additionally more changes / code was later cherry-picked / ported from that repository (https://github.com/tobrun/flutter-mapbox-gl), while the license continued to be the same as at the time of the fork, which is:) ------------------------------------------------------------------------------------------------------- - -flutter-mapbox-gl copyright (c) 2018, Mapbox. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- -This project uses the MapLibre GL native libraries for Android and iOS from https://github.com/maplibre/maplibre-gl-native, which contain the following LICENSE: ------------------------------------------------------------------------------------------------------- -BSD 2-Clause License - -Copyright (c) 2021 MapLibre contributors - -Copyright (c) 2018-2021 MapTiler.com - -Copyright (c) 2014-2020 Mapbox - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- -This project uses MapLibre GL JS library from https://github.com/maplibre/maplibre-gl-js, which contains the following LICENSE: ------------------------------------------------------------------------------------------------------- -Copyright (c) 2020, MapLibre contributors - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of MapLibre GL JS nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -------------------------------------------------------------------------------- - -Contains code from mapbox-gl-js v1.13 and earlier - -Version v1.13 of mapbox-gl-js and earlier are licensed under a BSD-3-Clause license - -Copyright (c) 2020, Mapbox -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* Neither the name of Mapbox GL JS nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -------------------------------------------------------------------------------- - -Contains code from glfx.js - -Copyright (C) 2011 by Evan Wallace - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - --------------------------------------------------------------------------------- - -Contains a portion of d3-color https://github.com/d3/d3-color - -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSE b/LICENSE new file mode 120000 index 000000000..e335b5d78 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +maplibre_gl/LICENSE \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 6151a48fb..000000000 --- a/README.md +++ /dev/null @@ -1,262 +0,0 @@ -# Flutter MapLibre GL - -[![Pub Version](https://img.shields.io/pub/v/maplibre_gl)](https://pub.dev/packages/maplibre_gl) -[![likes](https://img.shields.io/pub/likes/maplibre_gl?logo=flutter)](https://pub.dev/packages/maplibre_gl) -[![Pub Points](https://img.shields.io/pub/points/maplibre_gl)](https://pub.dev/packages/maplibre_gl/score) -[![stars](https://badgen.net/github/stars/maplibre/flutter-maplibre-gl?label=stars&color=green&icon=github)](https://github.com/josxha/flutter-maplibre-gl/stargazers) - -This Flutter plugin allows to show **embedded interactive and customizable -vector maps** as a Flutter widget. - -- This project is a fork - of [flutter-mapbox-gl](https://github.com/tobrun/flutter-mapbox-gl), - replacing its usage of Mapbox GL libraries with the open - source [MapLibre GL](https://github.com/maplibre) libraries. -- The repository has been transferred to - the [MapLibre](https://github.com/maplibre) - organization. You shouldn't see any negative effects, as GitHub automatically - redirects references from the old URL to the new URL. Please - see [#221](https://github.com/maplibre/flutter-maplibre-gl/issues/221) for - more information. - -### Supported Platforms - -- Support for **web** through [maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js) -- Support for **android** and **iOS** through [maplibre-native](https://github.com/maplibre/maplibre-native) - -This project only supports a subset of the API exposed by these libraries. - -### Supported API - -| Feature | Android | iOS | Web | -|----------------|:-------:|:---:|:---:| -| Style | βœ… | βœ… | βœ… | -| Camera | βœ… | βœ… | βœ… | -| Gesture | βœ… | βœ… | βœ… | -| User Location | βœ… | βœ… | βœ… | -| Symbol | βœ… | βœ… | βœ… | -| Circle | βœ… | βœ… | βœ… | -| Line | βœ… | βœ… | βœ… | -| Fill | βœ… | βœ… | βœ… | -| Fill Extrusion | βœ… | βœ… | βœ… | -| Heatmap Layer | βœ… | βœ… | βœ… | - -## Get Started - -#### Add as a dependency - -Add `maplibre_gl` to your project by running this command: - -```bash -flutter pub add maplibre_gl -``` - -or add it directly as a dependency to your `pubspec.yaml` file: - -```yaml -dependencies: - maplibre_gl: ^0.19.0 -``` - -### iOS - -There is no specific setup for iOS needed any more to use the package. -If you added specific lines in an earlier version, you'll have to remove them -or your project won't build. - -
-View obsolete code - -```ruby -source 'https://cdn.cocoapods.org/' -source 'https://github.com/m0nac0/flutter-maplibre-podspecs.git' - -pod 'MapLibre' -pod 'MapLibreAnnotationExtension' -``` - -
- -#### Use the location feature - -If you access your users' location, you should also add the following key -to `ios/Runner/Info.plist` to explain why you need access to their location -data: - -```xml - - NSLocationWhenInUseUsageDescription - [Your explanation here] - -``` - -A possible explanation could be: "Shows your location on the map". - -### Android - -There is no specific setup for android needed to use the package. - -#### Use the location feature - -If you want to show the user's location on the map you need to add -the `ACCESS_COARSE_LOCATION` or `ACCESS_FINE_LOCATION` permission in the -application manifest `android/app/src/main/AndroidManifest.xml`.: - -```xml - - - - -``` - -Starting from Android API level 23 you also need to request it at runtime. This -plugin does not handle this for you. Our example app uses the -flutter "[location](https://pub.dev/packages/location)" plugin for this. - -### Web - -Include the following JavaScript and CSS files in the `` of -your `web/index.html` file: - -```html - - -``` - -## Map Styles - -Map styles can be supplied by setting the `styleString` in the `MapLibreMap` -constructor. The following formats are supported: - -1. Passing the URL of the map style. This should be a custom map style served - remotely using a URL that start with `http(s)://` -2. Passing the style as a local asset. Create a JSON file in the `assets` and - add a reference in `pubspec.yml`. Set the style string to the relative path - for this asset in order to load it into the map. -3. Passing the style as a local file. create an JSON file in app directory (e.g. - ApplicationDocumentsDirectory). Set the style string to the absolute path of - this JSON file. -4. Passing the raw JSON of the map style. This is only supported on Android. - -### Tile sources requiring an API key - -If your tile source requires an API key, we recommend directly specifying a -source url with the API key included. -For example: - -```console -https://tiles.example.com/{z}/{x}/{y}.vector.pbf?api_key={your_key} -``` - -## Documentation - -- Check - the [API documentation](https://pub.dev/documentation/maplibre_gl/latest/). -- See example implementations in - our [example project](https://github.com/maplibre/flutter-maplibre-gl/tree/main/example). -- For more information about the MapLibre libraries - visit [maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js) - and [maplibre-native](https://github.com/maplibre/maplibre-native). - -## Getting Help - -- **Need help with your code?**: Check - the [discussions](https://github.com/maplibre/flutter-maplibre-gl/discussions) - on this repo or open a new one. - Or look for previous questions on - the [#maplibre](https://stackoverflow.com/questions/tagged/maplibre) tag β€” - or [ask a new question](https://stackoverflow.com/questions/tagged/maplibre). -- **Have a bug to report?** - [Open an issue](https://github.com/maplibre/flutter-maplibre-gl/issues/new). - If possible, include a full log, code and information which shows the issue. -- **Have a feature request?** - [Open an issue](https://github.com/maplibre/flutter-maplibre-gl/issues/new). - Tell us what the feature should do and why you want the feature. - -## Common problems & frequent questions - -### Loading .mbtiles tile files or sprites/glyphs from the assets shipped with the app - -
- Click here to expand / hide. - -One approach that has been used successfully to do that is to copy the files -from the app's assets directory to another directory, e.g. the app's cache -directory, and then reference that location. -See e.g. issues https://github.com/maplibre/flutter-maplibre-gl/issues/338 -and https://github.com/maplibre/flutter-maplibre-gl/issues/318 - ---- -
- -### Avoid Android UnsatisfiedLinkError - -
- Click here to expand / hide. - -Update buildTypes in `android\app\build.gradle` - -```gradle -buildTypes { - release { - // other configs - ndk { - abiFilters 'armeabi-v7a','arm64-v8a','x86_64', 'x86' - } - } -} -``` - ---- -
- -### iOS app crashes when using location based features - -
- Click here to expand / hide. - -Please include the `NSLocationWhenInUseUsageDescription` as -described [here](#location-features) - ---- -
- -### Layer is not displayed on IOS, but no error - -
- Click here to expand / hide. - -Have a look in your `LayerProperties` object, if you supply a `lineColor` -argument, (or any color argument) the issue might come from here. -Android supports the following format : `'rgba(192, 192, 255, 1.0)'`, but on -iOS, this doesn't work! - -You have to have the color in the following format : `#C0C0FF` - ---- -
- -### iOS crashes with error: `'NSInvalidArgumentException', reason: 'Invalid filter value: filter property must be a string'` - -
- Click here to expand / hide. - -Check if one of your expression is : `["!has", "value"]`. Android support this -format, but iOS does not. -You can replace your expression with : `["!",["has", "value"] ]` which works -both in Android and iOS. - -Note : iOS will display the -error : `NSPredicate: Use of 'mgl_does:have:' as an NSExpression function is forbidden`, -but it seems like the expression still works well. - ---- -
- -## Contributing - -[Feedback](https://github.com/maplibre/flutter-maplibre-gl/issues), -contributing pull requests -and [bug reports](https://github.com/maplibre/flutter-maplibre-gl/issues) are -very welcome! diff --git a/README.md b/README.md new file mode 120000 index 000000000..1afecae24 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +maplibre_gl/README.md \ No newline at end of file diff --git a/example/.gitignore b/example/.gitignore deleted file mode 100644 index 9d7edcf8b..000000000 --- a/example/.gitignore +++ /dev/null @@ -1,70 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# Visual Studio Code related -.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.packages -.pub-cache/ -.pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 5c99092b1..343c61785 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: flutter: sdk: flutter maplibre_gl: - path: .. + path: ../maplibre_gl location: ^5.0.3 path_provider: ^2.0.15 http: ^1.1.0 @@ -21,9 +21,10 @@ dependencies: device_info_plus: ^9.0.2 dev_dependencies: - very_good_analysis: ^5.0.0 flutter_test: sdk: flutter + very_good_analysis: ^5.0.0 + flutter: uses-material-design: true diff --git a/example/pubspec_overrides.yaml b/example/pubspec_overrides.yaml deleted file mode 100644 index f24c5d539..000000000 --- a/example/pubspec_overrides.yaml +++ /dev/null @@ -1,7 +0,0 @@ -dependency_overrides: - maplibre_gl: - path: .. - maplibre_gl_platform_interface: - path: ../maplibre_gl_platform_interface - maplibre_gl_web: - path: ../maplibre_gl_web diff --git a/flutter_maplibre_gl.code-workspace b/flutter_maplibre_gl.code-workspace new file mode 100644 index 000000000..e700bce2b --- /dev/null +++ b/flutter_maplibre_gl.code-workspace @@ -0,0 +1,20 @@ +{ + "folders": [ + { + "name": "example", + "path": "./example" + }, + { + "name": "flutter_maplibre_gl", + "path": "./flutter_maplibre_gl" + }, + { + "name": "flutter_maplibre_gl_platform_interface", + "path": "./flutter_maplibre_gl_platform_interface" + }, + { + "name": "flutter_maplibre_gl_web", + "path": "./flutter_maplibre_gl_web" + }, + ] +} \ No newline at end of file diff --git a/maplibre_gl/CHANGELOG.md b/maplibre_gl/CHANGELOG.md new file mode 100644 index 000000000..16ca69bf3 --- /dev/null +++ b/maplibre_gl/CHANGELOG.md @@ -0,0 +1,499 @@ +## UNRELEASED + +* Move the `maplibre_gl` package to a subdirectory of the repository and add + melos to orchestrate all packages. + +## 0.20.0 + +A lot of files/classes have been renamed and moved around in this release. +If you notice any build errors, please make sure to run `flutter clean`. + +### Breaking changes + +* All Dart enums have been migrated from mixed cases to lower camelcase + according to the `camel_case_types` lint rule. +* Move `MapLibreStyles` to the main `maplibre_gl` package. You can now use the + demo style without adding `maplibre_gl_platform_interface` as a dependency. +* Updated maplibre-native for ios to v6.5.0. This introduces the new + iOS Metal renderer and the OpenGL ES renderer now uses OpenGL ES 3.0. Only + iOS Devices with an Apple A7 GPU or later are supported onwards. See the + [maplibre-native changelog](https://github.com/maplibre/maplibre-native/blob/main/platform/ios/CHANGELOG.md#600) + for more information. +* Updated maplibre-native for android to v11.0.0. This version uses + OpenGL ES 3.0. See the + [maplibre-native changelog](https://github.com/maplibre/maplibre-native/blob/main/platform/android/CHANGELOG.md#1100) + for more information. +* Renamed the method channel to `plugins.flutter.io/maplibre_gl_*` in all + packages. +* Renamed "Maplibre" to "MapLibre" to be in line with maplibre-native + (affects for example the classes `MaplibreMap` and `MaplibreMapController`). + +### Changes + +* Added support for Swift Package Manager usage on iOS. +* Migrated main iOS plugin class from Objective-C to Swift. +* Renamed iOS plugin classes from `Mapbox` to `MapLibre`. + +**Full Changelog**: +[v0.19.0+2...v0.20.0](https://github.com/maplibre/flutter-maplibre-gl/compare/v0.19.0+2...v0.20.0) + +## 0.19.0 + +This is the first version where all packages are published on pub.dev. Please +use the `maplibre_gl` package directly from pub.dev from now on. Check the +`README` documentation on how to include it in your project. + +### Changes + +* Bump min Dart SDK to 3.0.0 (this was already implicitly required by transitive + dependencies) +* Prepare all packages for publishing + to [pub.dev](https://pub.dev/packages/maplibre_gl) +* Add support for + the [Fill Extrusion layer](https://maplibre.org/maplibre-style-spec/layers/#fill-extrusion) +* Add support for + the [Heatmap layer](https://maplibre.org/maplibre-style-spec/layers/#heatmap) +* Update documentation +* (android) Bump Android `compileSdkVersion` to 34 +* (iOS) Add `iosLongClickDuration` as parameter to customize the long click + duration. +* (web) Loosen the dependency constraint of [js](https://pub.dev/packages/js) to + allow `0.6.x` and `0.7.x`. + +### Bug Fixes + +* (android) Fix support for newer gradle versions (Add support for Gradle/AGP + namespace configuration) +* (android) Fix `NullPointerException` when changing the visibility of a layer ( + layer#setVisibility) +* (android) Fix enum parsing for the `onCameraTracking` callback +* (iOS) Fix tap detection on features if the feature id is null +* (web) Fix flickering when the style takes time to load + +**Full Changelog**: +[0.18.0...v0.19.0](https://github.com/maplibre/flutter-maplibre-gl/compare/0.18.0...v0.19.0) + +## 0.18.0 + +### Breaking Change: + +Already since 0.17.0, developers do not need to adapt their Podfile for iOS apps +anymore as it was previously described in the Readme. Developers who previously +added these lines should remove them, since not removing these lines may cause a +build failure on iOS. (This change actually already landed in 0.17.0, but it may +not have been sufficiently clear that not removing these lines might break +builds). + +### Other Changes: + +* new feature: set arbitrary layer properties by @m0nac0 + in [#303](https://github.com/maplibre/flutter-maplibre-gl/pull/303) +* Update release process by @m0nac0 + in [#315](https://github.com/maplibre/flutter-maplibre-gl/pull/315) +* Add workflows for automated publishing to pub.dev by @m0nac0 + in [#328](https://github.com/maplibre/flutter-maplibre-gl/pull/328) +* Fix example app pubspec by @m0nac0 + in [#329](https://github.com/maplibre/flutter-maplibre-gl/pull/329) +* Updated location plugin version for example app by @varunlohade + in [#334](https://github.com/maplibre/flutter-maplibre-gl/pull/334) +* Housekeeping: Improve docs and update outdated references to point to MapLibre + by @m0nac0 in [#330](https://github.com/maplibre/flutter-maplibre-gl/pull/330) + +**Full Changelog**: +[0.17.0...0.18.0](https://github.com/maplibre/flutter-maplibre-gl/compare/0.17.0...0.18.0) + +## 0.17.0 + +* **Repository transfer**: The project repository was transferred to the + MapLibre GitHub organization. More information + at [#221](https://github.com/maplibre/flutter-maplibre-gl/issues/221) +* Developers do not need to adapt their Podfile for iOS apps anymore as it was + previously described in the + Readme. [#278](https://github.com/maplibre/flutter-maplibre-gl/pull/278) + +### Breaking Change: + +* `maplibre_gl/mapbox_gl.dart` was renamed to `maplibre_gl/maplibre_gl.dart`. + You can do a replace-all from `import 'package:maplibre_gl/mapbox_gl.dart';` + to `import 'package:maplibre_gl/maplibre_gl.dart';` +* `useDelayedDisposal` was removed since its now fixed + in [#259](https://github.com/maplibre/flutter-maplibre-gl/pull/259) +* `useHybridCompositionOverride` was removed since it was added in the following + fix: [#203](https://github.com/maplibre/flutter-maplibre-gl/pull/203) and we + reverted + the fix and used another approach to fix the actual issue. +* The default for `myLocationRenderMode` was changed from `COMPASS` to `NORMAL` + in [#244](https://github.com/maplibre/flutter-maplibre-gl/pull/244), since the + previous default value of `COMPASS` implicitly enables displaying the location + on iOS, which could crash apps that didn't want to display the device + location. If you want to continue to use `MyLocationRenderMode.COMPASS`, + please explicitly specify it in the constructor like this: + +```dart +@override +Widget build() { + return MapLibreMap( + myLocationRenderMode: MyLocationRenderMode.COMPASS, + // ... + ); +} +``` + +* The old api `registerWith` was removed from the MapboxMapsPlugin.java, since + there is no need for that. +* The `minSdkVersion` was bumped to at least 21 now, since the native android + sdk constraint expect that. +* Changed the minimum Dart version from sdk: `2.12.0` to `2.14.0` + in `maplibre_gl_platform_interface/pubspec.yaml`. + +### Further changes + +Note: This list only contains a subset of all contributions, notably excluding +those that e.g. only affect the GitHub Actions CI or documentation. See the link +at the end for a full changelog. + +* feat: add support for reading style json from file in ios by @TimAlber + in [#132](https://github.com/maplibre/flutter-maplibre-gl/pull/132) +* Add podspecs in correct Cocoapods layout by @kuhnroyal + in [#128](https://github.com/maplibre/flutter-maplibre-gl/pull/128) +* fix: fix the queryRenderedFeatures code on iOS by @TimAlber + in [#137](https://github.com/maplibre/flutter-maplibre-gl/pull/137) +* feat: Set layer visibility by @m0nac0 + in [#138](https://github.com/maplibre/flutter-maplibre-gl/pull/138) +* feat: add support for changing the receiver’s viewport to fit given bounds by + @TimAlber in [#133](https://github.com/maplibre/flutter-maplibre-gl/pull/133) +* Change feature JSON encoding from .ascii to .utf8 by @SunBro-Marko + in [#142](https://github.com/maplibre/flutter-maplibre-gl/pull/142) +* web: implement setCameraBounds by @m0nac0 + in [#145](https://github.com/maplibre/flutter-maplibre-gl/pull/145) +* Use offical maplibre-gl.js and add README info by @Robbendebiene + in [#163](https://github.com/maplibre/flutter-maplibre-gl/pull/163) +* android: adding tileSize to raster source by @mariusvn + in [#166](https://github.com/maplibre/flutter-maplibre-gl/pull/166) +* Readme: document git default values for codespaces by @m0nac0 + in [#170](https://github.com/maplibre/flutter-maplibre-gl/pull/170) +* query source features by @Grodien + in [#154](https://github.com/maplibre/flutter-maplibre-gl/pull/154) +* Trimming styleString to simplify the JSON detection by @mariusvn + in [#175](https://github.com/maplibre/flutter-maplibre-gl/pull/175) +* Fix getVisibleRegion method by @BartoszStasiurka + in [#179](https://github.com/maplibre/flutter-maplibre-gl/pull/179) +* Reenable textureMode which was disabled in f8b2d1 by @maxammann + in [#194](https://github.com/maplibre/flutter-maplibre-gl/pull/194) +* android: Bump MapLibre SDK to 9.6.0 & OkHttp to 4.9.3 by @mariusvn + in [#184](https://github.com/maplibre/flutter-maplibre-gl/pull/184) +* Added getSourceIds to the controller by @mariusvn + in [#197](https://github.com/maplibre/flutter-maplibre-gl/pull/197) +* Moved EventChannel creation in the downloadOfflineRegion method by @mariusvn + in [#205](https://github.com/maplibre/flutter-maplibre-gl/pull/205) +* Fix crash android dispose nullpointerdereference by @GaelleJoubert + in [#203](https://github.com/maplibre/flutter-maplibre-gl/pull/203) +* Migrate links in README, pubspec to MapLibre by @kuhnroyal + in [#224](https://github.com/maplibre/flutter-maplibre-gl/pull/224) +* Update LICENSE file by @mariusvn + in [#230](https://github.com/maplibre/flutter-maplibre-gl/pull/230) +* upgrade dependency image by @m0nac0 + in [#248](https://github.com/maplibre/flutter-maplibre-gl/pull/248) +* fix-example-app by @JulianBissekkou + in [#261](https://github.com/maplibre/flutter-maplibre-gl/pull/261) +* 162-animate-camera-on-web-fix by @JulianBissekkou + in [#254](https://github.com/maplibre/flutter-maplibre-gl/pull/254) +* 243-fix-crash-when-no-location-permission by @JulianBissekkou + in [#244](https://github.com/maplibre/flutter-maplibre-gl/pull/244) +* 182-disposal-null-ref-crash by @JulianBissekkou + in [#259](https://github.com/maplibre/flutter-maplibre-gl/pull/259) +* New android sdk version by @stefanschaller + in [#270](https://github.com/maplibre/flutter-maplibre-gl/pull/270) +* 250-change-language-fixes by @stefanschaller + in [#275](https://github.com/maplibre/flutter-maplibre-gl/pull/275) +* upgrade-ios-version by @JulianBissekkou + in [#277](https://github.com/maplibre/flutter-maplibre-gl/pull/277) +* Simplify iOS usage instructions and example podfile by @m0nac0 + in [#278](https://github.com/maplibre/flutter-maplibre-gl/pull/278) +* Add opportunity to use map in widget tests by @ManoyloK + in [#281](https://github.com/maplibre/flutter-maplibre-gl/pull/281) +* fix-layers-prod-build by @stefanschaller + in [#291](https://github.com/maplibre/flutter-maplibre-gl/pull/291) +* Fix the codespace by upgrading the docker image by @ouvreboite + in [#297](https://github.com/maplibre/flutter-maplibre-gl/pull/297) +* Add `updateImageSource`. by @CaviarChen + in [#271](https://github.com/maplibre/flutter-maplibre-gl/pull/271) +* fix "unexpected null value" error when onStyleLoadedCallback is null by + @m0nac0 in [#307](https://github.com/maplibre/flutter-maplibre-gl/pull/307) +* attributionButtonPosition for web by @ouvreboite + in [#304](https://github.com/maplibre/flutter-maplibre-gl/pull/304) + +**Full Changelog**: +https://github.com/maplibre/flutter-maplibre-gl/compare/0.16.0...0.17.0 + +## 0.16.0, Jun 28, 2022 + +* cherry-picked all commits from upstream up + to [https://github.com/flutter-mapbox-gl/maps/commit/3496907955cd4b442e4eb905d67e8d46692174f1), + including up to release 0.16.0 from upstream +* updated MapLibre GL JS for web + +## 0.15.1, May 24, 2022 + +* cherry-picked all commits from upstream up + to [upstream release 0.15.0](https://github.com/flutter-mapbox-gl/maps/releases/tag/0.15.0) +* improved documentation +* betted adapted the example app to MapLibre +* hide logo on Android/iOS to match web + +## 0.15.0, Oct 26, 2021 + +* Fix bug when changing line color (see #448) by @vberthet + in [#15](https://github.com/m0nac0/flutter-maplibre-gl/pull/15) +* Remove unnecessary imports by @m0nac0 + in [#34](https://github.com/m0nac0/flutter-maplibre-gl/pull/34) +* Update example with Flutter 2.5.3 by @kuhnroyal + in [#35](https://github.com/m0nac0/flutter-maplibre-gl/pull/35) +* CI: Use separate scheduled pipeline for Flutter beta builds by @kuhnroyal + in [#28](https://github.com/m0nac0/flutter-maplibre-gl/pull/28) +* Null safety (cherry-pick from upstream) by @m0nac0 + in [#31](https://github.com/m0nac0/flutter-maplibre-gl/pull/31) +* [web] add missing removeLines, removeCircles and removeFills (cherry-pick + tobrun#622) by @m0nac0 + in [#32](https://github.com/m0nac0/flutter-maplibre-gl/pull/32) +* Replace style string in local style example by @m0nac0 + in [#33](https://github.com/m0nac0/flutter-maplibre-gl/pull/33) +* [web] add getSymbolLatLng and getLineLatLngs by @m0nac0 + in [#37](https://github.com/m0nac0/flutter-maplibre-gl/pull/37) + +## 0.14.0 + +### Breaking changes: + +* Remove access token, update libraries, replace example + styles [#25](https://github.com/m0nac0/flutter-maplibre-gl/pull/25) (also + see [#21](https://github.com/m0nac0/flutter-maplibre-gl/issues/21)) + * The parameter `accessToken` of class `MaplibreMap` was removed. If you + want to continue using a tile provider that requires an API key, specify + that key directly in the URL of the tile source ( + see [https://github.com/m0nac0/flutter-maplibre-gl#tile-sources-requiring-an-api-key](https://github.com/m0nac0/flutter-maplibre-gl#tile-sources-requiring-an-api-key)) + * The built-in constants for specific styles were also removed. You can + continue using these styles by using the styles' URL + +### Other changes: + +* Remove warning about missing access token on + Android [#22](https://github.com/m0nac0/flutter-maplibre-gl/pull/22) +* Example: use maplibre styles and add new demo + style [#23](https://github.com/m0nac0/flutter-maplibre-gl/pull/23) +* Add about button to example + app [#26](https://github.com/m0nac0/flutter-maplibre-gl/pull/26) +* various improvements to the CI +* fixed formatting for some files that were not correctly formatted + +## 0.13.0, Oct 6, 2021 + +πŸŽ‰ The first release of flutter-maplibre-gl with the complete transition to +MapLibre libraries. πŸŽ‰ + +Further improvements: + +* Update to MapLibre-Android-SDK 9.4.2 +* Update to MapLibre-iOS-SDK 5.12.0 +* Fix onUserLocationUpdated not firing on + android [#14](https://github.com/m0nac0/flutter-maplibre-gl/pull/14) +* Add speed to + UserLocation [#11](https://github.com/m0nac0/flutter-maplibre-gl/pull/11) +* Fix queryRenderedFeaturesInRect for + iOS [#10](https://github.com/m0nac0/flutter-maplibre-gl/pull/10) + +### Changes cherry-picked/ported from tobrun/flutter-mapbox-gl:0.12.0 + +* Batch creation/removal for circles, fills and + lines [#576](https://github.com/tobrun/flutter-mapbox-gl/pull/576) +* Dependencies: updated image + package [#598](https://github.com/tobrun/flutter-mapbox-gl/pull/598) +* Improve description to enable location + features [#596](https://github.com/tobrun/flutter-mapbox-gl/pull/596) +* Fix feature manager on release + build [#593](https://github.com/tobrun/flutter-mapbox-gl/pull/593) +* Emit onTap only for the feature above the + others [#589](https://github.com/tobrun/flutter-mapbox-gl/pull/589) +* Add annotationOrder to + web [#588](https://github.com/tobrun/flutter-mapbox-gl/pull/588) + +### Changes cherry-picked/ported from tobrun/flutter-mapbox-gl:0.11.0 + +* Fixed issues caused by new android + API [#544](https://github.com/tobrun/flutter-mapbox-gl/pull/544) +* Add option to set maximum offline tile + count [#549](https://github.com/tobrun/flutter-mapbox-gl/pull/549) +* Fixed web build failure due to http package + upgrade [#550](https://github.com/tobrun/flutter-mapbox-gl/pull/550) +* Update OfflineRegion/OfflineRegionDefinition interfaces, synchronize with iOS + and Android [#545](https://github.com/tobrun/flutter-mapbox-gl/pull/545) +* Fix Mapbox GL JS CSS embedding on + web [#551](https://github.com/tobrun/flutter-mapbox-gl/pull/551) +* Update Podfile to fix iOS + CI [#565](https://github.com/tobrun/flutter-mapbox-gl/pull/565) +* Update deprecated patterns to fix CI static + analysis [#568](https://github.com/tobrun/flutter-mapbox-gl/pull/568) +* Add setOffline method on + Android [#537](https://github.com/tobrun/flutter-mapbox-gl/pull/537) +* Add batch mode of screen + locations [#554](https://github.com/tobrun/flutter-mapbox-gl/pull/554) +* Define which annotations consume the tap + events [#575](https://github.com/tobrun/flutter-mapbox-gl/pull/575) +* Remove failed offline region + downloads [#583](https://github.com/tobrun/flutter-mapbox-gl/pull/583) + +## Below is the original changelog of the tobrun/flutter-mapbox-gl project, before the fork. + +## 0.10.0, February 12, 2020 + +* Merge offline + regions [#532](https://github.com/tobrun/flutter-mapbox-gl/pull/532) +* Update offline region + metadata [#530](https://github.com/tobrun/flutter-mapbox-gl/pull/530) +* Added web support for + fills [#501](https://github.com/tobrun/flutter-mapbox-gl/pull/501) +* Support styleString as "Documents directory/Temporary + directory" [#520](https://github.com/tobrun/flutter-mapbox-gl/pull/520) +* Use offline region + ids [#491](https://github.com/tobrun/flutter-mapbox-gl/pull/491) +* Ability to define annotation layer + order [#523](https://github.com/tobrun/flutter-mapbox-gl/pull/523) +* Clear fills API [#527](https://github.com/tobrun/flutter-mapbox-gl/pull/527) +* Add heading to UserLocation and expose UserLocation + type [#522](https://github.com/tobrun/flutter-mapbox-gl/pull/522) +* Patch addFill with data + parameter [#524](https://github.com/tobrun/flutter-mapbox-gl/pull/524) +* Fix style annotation is not deselected on + iOS [#512](https://github.com/tobrun/flutter-mapbox-gl/pull/512) +* Update tracked camera position in + camera#onIdle [#500](https://github.com/tobrun/flutter-mapbox-gl/pull/500) +* Fix iOS implementation of map#toLatLng on + iOS [#495](https://github.com/tobrun/flutter-mapbox-gl/pull/495) +* Migrate to new Android flutter plugin + architecture [#488](https://github.com/tobrun/flutter-mapbox-gl/pull/488) +* Update readme to fix + UnsatisfiedLinkError [#422](https://github.com/tobrun/flutter-mapbox-gl/pull/442) +* Improved Image Source + Support [#469](https://github.com/tobrun/flutter-mapbox-gl/pull/469) +* Avoid white space when resizing map on + web [#474](https://github.com/tobrun/flutter-mapbox-gl/pull/474) +* Allow MapboxMap() to override Widget + Key. [#475](https://github.com/tobrun/flutter-mapbox-gl/pull/475) +* Offline region + feature [#336](https://github.com/tobrun/flutter-mapbox-gl/pull/336) +* Fix iOS symbol tapped + interaction [#443](https://github.com/tobrun/flutter-mapbox-gl/pull/443) + +## 0.9.0, October 24. 2020 + +* Fix data parameter for addLine and + addCircle [#388](https://github.com/tobrun/flutter-mapbox-gl/pull/388) +* Re-enable attribution on + Android [#383](https://github.com/tobrun/flutter-mapbox-gl/pull/383) +* Upgrade annotation plugin to + v0.9 [#381](https://github.com/tobrun/flutter-mapbox-gl/pull/381) +* Breaking change: CameraUpdate.newLatLngBounds() now supports setting different + padding values for left, top, right, bottom with default of 0 for all. + Implementations using the old approach with only one padding value for all + edges have to be + updated. [#382](https://github.com/tobrun/flutter-mapbox-gl/pull/382) +* web:ignore myLocationTrackingMode if myLocationEnabled is + false [#363](https://github.com/tobrun/flutter-mapbox-gl/pull/363) +* Add methods to access + projection [#380](https://github.com/tobrun/flutter-mapbox-gl/pull/380) +* Add fill API support for Android and + iOS [#49](https://github.com/tobrun/flutter-mapbox-gl/pull/49) +* Listen to OnUserLocationUpdated to provide user location to + app [#237](https://github.com/tobrun/flutter-mapbox-gl/pull/237) +* Correct integration in Activity lifecycle on + Android [#266](https://github.com/tobrun/flutter-mapbox-gl/pull/266) +* Add support for custom font stackn in symbol + options [#359](https://github.com/tobrun/flutter-mapbox-gl/pull/359) +* Fix memory leak on iOS caused by strong self + reference [#370](https://github.com/tobrun/flutter-mapbox-gl/pull/370) +* Basic ImageSource + Support [#409](https://github.com/tobrun/flutter-mapbox-gl/pull/409) +* Get meters per pixel at + latitude [#416](https://github.com/tobrun/flutter-mapbox-gl/pull/416) +* Fix + onStyleLoadedCallback [#418](https://github.com/tobrun/flutter-mapbox-gl/pull/418) + +## 0.8.0, August 22, 2020 + +- implementation of feature + querying [#177](https://github.com/tobrun/flutter-mapbox-gl/pull/177) +- Batch create/delete of + symbols [#279](https://github.com/tobrun/flutter-mapbox-gl/pull/279) +- Add multi map + support [#315](https://github.com/tobrun/flutter-mapbox-gl/pull/315) +- Fix OnCameraIdle not being + invoked [#313](https://github.com/tobrun/flutter-mapbox-gl/pull/313) +- Fix android zIndex symbol + option [#312](https://github.com/tobrun/flutter-mapbox-gl/pull/312) +- Set dependencies from + git [#319](https://github.com/tobrun/flutter-mapbox-gl/pull/319) +- Add line#getGeometry and + symbol#getGeometry [#281](https://github.com/tobrun/flutter-mapbox-gl/pull/281) + +## 0.7.0, June 6, 2020 + +* Introduction of mapbox_gl_platform_interface library +* Introduction of mapbox_gl_web library +* Integrate web support through mapbox-gl-js +* Add icon-allow-overlap configurations + +## 0.0.6, May 31, 2020 + +* Update mapbox depdendency to 9.2.0 (android) and 5.6.0 (iOS) +* Long press handlers for both iOS as Android +* Change default location tracking to none +* OnCameraIdle listener support +* Add image to style +* Add animation duration to animateCamera +* Content insets +* Visible region support on iOS +* Numerous bug fixes + +## 0.0.5, December 21, 2019 + +* iOS support for annotation extensions (circle, symbol, line) +* Update SDK to 8.5.0 (Android) and 5.5.0 (iOS) +* Integrate style loaded callback api +* Add Map click event (iOS) +* Cache management API (Android/iOS) +* Various fixes to showing user location and configurations (Android/iOS) +* Last location API (Android) +* Throttle max FPS of user location component (Android) +* Fix for handling permission handling of the test application (Android) +* Support for loading symbol images from assets (iOS/Android) + +## v0.0.4, Nov 2, 2019 + +* Update SDK to 8.4.0 (Android) and 5.4.0 (iOS) +* Add support for sideloading offline maps (Android/iOS) +* Add user tracking mode (iOS) +* Invert compassView.isHidden logic (iOS) +* Specific swift version (iOS) + +## v0.0.3, Mar 30, 2019 + +* Camera API (iOS) +* Line API (Android) +* Update codebase to AndroidX +* Update Mapbox Maps SDK for Android to v7.3.0 + +## v0.0.2, Mar 23, 2019 + +* Support for iOS +* Migration to embedded Android and iOS SDK View system +* Style URL API +* Style JSON API (Android) +* Gesture support +* Gesture restrictions (Android) +* Symbol API (Android) +* Location component (Android) +* Camera API (Android) + +## v0.0.1, May 7, 2018 + +* Initial Android surface rendering POC diff --git a/maplibre_gl/LICENSE b/maplibre_gl/LICENSE new file mode 100644 index 000000000..daaf99dfd --- /dev/null +++ b/maplibre_gl/LICENSE @@ -0,0 +1,181 @@ +flutter-maplibre-gl Copyright (c) 2023, MapLibre contributors. +flutter-maplibre-gl Copyright (c) 2021, m0nac0. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------------------------------ +------------------------------------------------------------------------------------------------------ +This project was forked from (and therefore contains a lot of modified and unmodified code from) https://github.com/tobrun/flutter-mapbox-gl which at the time of the fork (March 6th, 2021) contained the following LICENSE file: +(Additionally more changes / code was later cherry-picked / ported from that repository (https://github.com/tobrun/flutter-mapbox-gl), while the license continued to be the same as at the time of the fork, which is:) +------------------------------------------------------------------------------------------------------ + +flutter-mapbox-gl copyright (c) 2018, Mapbox. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------------------------------ +------------------------------------------------------------------------------------------------------ +This project uses the MapLibre GL native libraries for Android and iOS from https://github.com/maplibre/maplibre-gl-native, which contain the following LICENSE: +------------------------------------------------------------------------------------------------------ +BSD 2-Clause License + +Copyright (c) 2021 MapLibre contributors + +Copyright (c) 2018-2021 MapTiler.com + +Copyright (c) 2014-2020 Mapbox + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------------------------------ +------------------------------------------------------------------------------------------------------ +This project uses MapLibre GL JS library from https://github.com/maplibre/maplibre-gl-js, which contains the following LICENSE: +------------------------------------------------------------------------------------------------------ +Copyright (c) 2020, MapLibre contributors + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of MapLibre GL JS nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------------------------------------------------------------------------------- + +Contains code from mapbox-gl-js v1.13 and earlier + +Version v1.13 of mapbox-gl-js and earlier are licensed under a BSD-3-Clause license + +Copyright (c) 2020, Mapbox +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of Mapbox GL JS nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +------------------------------------------------------------------------------- + +Contains code from glfx.js + +Copyright (C) 2011 by Evan Wallace + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +-------------------------------------------------------------------------------- + +Contains a portion of d3-color https://github.com/d3/d3-color + +Copyright 2010-2016 Mike Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of contributors may be used to + endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/maplibre_gl/README.md b/maplibre_gl/README.md new file mode 100644 index 000000000..6151a48fb --- /dev/null +++ b/maplibre_gl/README.md @@ -0,0 +1,262 @@ +# Flutter MapLibre GL + +[![Pub Version](https://img.shields.io/pub/v/maplibre_gl)](https://pub.dev/packages/maplibre_gl) +[![likes](https://img.shields.io/pub/likes/maplibre_gl?logo=flutter)](https://pub.dev/packages/maplibre_gl) +[![Pub Points](https://img.shields.io/pub/points/maplibre_gl)](https://pub.dev/packages/maplibre_gl/score) +[![stars](https://badgen.net/github/stars/maplibre/flutter-maplibre-gl?label=stars&color=green&icon=github)](https://github.com/josxha/flutter-maplibre-gl/stargazers) + +This Flutter plugin allows to show **embedded interactive and customizable +vector maps** as a Flutter widget. + +- This project is a fork + of [flutter-mapbox-gl](https://github.com/tobrun/flutter-mapbox-gl), + replacing its usage of Mapbox GL libraries with the open + source [MapLibre GL](https://github.com/maplibre) libraries. +- The repository has been transferred to + the [MapLibre](https://github.com/maplibre) + organization. You shouldn't see any negative effects, as GitHub automatically + redirects references from the old URL to the new URL. Please + see [#221](https://github.com/maplibre/flutter-maplibre-gl/issues/221) for + more information. + +### Supported Platforms + +- Support for **web** through [maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js) +- Support for **android** and **iOS** through [maplibre-native](https://github.com/maplibre/maplibre-native) + +This project only supports a subset of the API exposed by these libraries. + +### Supported API + +| Feature | Android | iOS | Web | +|----------------|:-------:|:---:|:---:| +| Style | βœ… | βœ… | βœ… | +| Camera | βœ… | βœ… | βœ… | +| Gesture | βœ… | βœ… | βœ… | +| User Location | βœ… | βœ… | βœ… | +| Symbol | βœ… | βœ… | βœ… | +| Circle | βœ… | βœ… | βœ… | +| Line | βœ… | βœ… | βœ… | +| Fill | βœ… | βœ… | βœ… | +| Fill Extrusion | βœ… | βœ… | βœ… | +| Heatmap Layer | βœ… | βœ… | βœ… | + +## Get Started + +#### Add as a dependency + +Add `maplibre_gl` to your project by running this command: + +```bash +flutter pub add maplibre_gl +``` + +or add it directly as a dependency to your `pubspec.yaml` file: + +```yaml +dependencies: + maplibre_gl: ^0.19.0 +``` + +### iOS + +There is no specific setup for iOS needed any more to use the package. +If you added specific lines in an earlier version, you'll have to remove them +or your project won't build. + +
+View obsolete code + +```ruby +source 'https://cdn.cocoapods.org/' +source 'https://github.com/m0nac0/flutter-maplibre-podspecs.git' + +pod 'MapLibre' +pod 'MapLibreAnnotationExtension' +``` + +
+ +#### Use the location feature + +If you access your users' location, you should also add the following key +to `ios/Runner/Info.plist` to explain why you need access to their location +data: + +```xml + + NSLocationWhenInUseUsageDescription + [Your explanation here] + +``` + +A possible explanation could be: "Shows your location on the map". + +### Android + +There is no specific setup for android needed to use the package. + +#### Use the location feature + +If you want to show the user's location on the map you need to add +the `ACCESS_COARSE_LOCATION` or `ACCESS_FINE_LOCATION` permission in the +application manifest `android/app/src/main/AndroidManifest.xml`.: + +```xml + + + + +``` + +Starting from Android API level 23 you also need to request it at runtime. This +plugin does not handle this for you. Our example app uses the +flutter "[location](https://pub.dev/packages/location)" plugin for this. + +### Web + +Include the following JavaScript and CSS files in the `` of +your `web/index.html` file: + +```html + + +``` + +## Map Styles + +Map styles can be supplied by setting the `styleString` in the `MapLibreMap` +constructor. The following formats are supported: + +1. Passing the URL of the map style. This should be a custom map style served + remotely using a URL that start with `http(s)://` +2. Passing the style as a local asset. Create a JSON file in the `assets` and + add a reference in `pubspec.yml`. Set the style string to the relative path + for this asset in order to load it into the map. +3. Passing the style as a local file. create an JSON file in app directory (e.g. + ApplicationDocumentsDirectory). Set the style string to the absolute path of + this JSON file. +4. Passing the raw JSON of the map style. This is only supported on Android. + +### Tile sources requiring an API key + +If your tile source requires an API key, we recommend directly specifying a +source url with the API key included. +For example: + +```console +https://tiles.example.com/{z}/{x}/{y}.vector.pbf?api_key={your_key} +``` + +## Documentation + +- Check + the [API documentation](https://pub.dev/documentation/maplibre_gl/latest/). +- See example implementations in + our [example project](https://github.com/maplibre/flutter-maplibre-gl/tree/main/example). +- For more information about the MapLibre libraries + visit [maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js) + and [maplibre-native](https://github.com/maplibre/maplibre-native). + +## Getting Help + +- **Need help with your code?**: Check + the [discussions](https://github.com/maplibre/flutter-maplibre-gl/discussions) + on this repo or open a new one. + Or look for previous questions on + the [#maplibre](https://stackoverflow.com/questions/tagged/maplibre) tag β€” + or [ask a new question](https://stackoverflow.com/questions/tagged/maplibre). +- **Have a bug to report?** + [Open an issue](https://github.com/maplibre/flutter-maplibre-gl/issues/new). + If possible, include a full log, code and information which shows the issue. +- **Have a feature request?** + [Open an issue](https://github.com/maplibre/flutter-maplibre-gl/issues/new). + Tell us what the feature should do and why you want the feature. + +## Common problems & frequent questions + +### Loading .mbtiles tile files or sprites/glyphs from the assets shipped with the app + +
+ Click here to expand / hide. + +One approach that has been used successfully to do that is to copy the files +from the app's assets directory to another directory, e.g. the app's cache +directory, and then reference that location. +See e.g. issues https://github.com/maplibre/flutter-maplibre-gl/issues/338 +and https://github.com/maplibre/flutter-maplibre-gl/issues/318 + +--- +
+ +### Avoid Android UnsatisfiedLinkError + +
+ Click here to expand / hide. + +Update buildTypes in `android\app\build.gradle` + +```gradle +buildTypes { + release { + // other configs + ndk { + abiFilters 'armeabi-v7a','arm64-v8a','x86_64', 'x86' + } + } +} +``` + +--- +
+ +### iOS app crashes when using location based features + +
+ Click here to expand / hide. + +Please include the `NSLocationWhenInUseUsageDescription` as +described [here](#location-features) + +--- +
+ +### Layer is not displayed on IOS, but no error + +
+ Click here to expand / hide. + +Have a look in your `LayerProperties` object, if you supply a `lineColor` +argument, (or any color argument) the issue might come from here. +Android supports the following format : `'rgba(192, 192, 255, 1.0)'`, but on +iOS, this doesn't work! + +You have to have the color in the following format : `#C0C0FF` + +--- +
+ +### iOS crashes with error: `'NSInvalidArgumentException', reason: 'Invalid filter value: filter property must be a string'` + +
+ Click here to expand / hide. + +Check if one of your expression is : `["!has", "value"]`. Android support this +format, but iOS does not. +You can replace your expression with : `["!",["has", "value"] ]` which works +both in Android and iOS. + +Note : iOS will display the +error : `NSPredicate: Use of 'mgl_does:have:' as an NSExpression function is forbidden`, +but it seems like the expression still works well. + +--- +
+ +## Contributing + +[Feedback](https://github.com/maplibre/flutter-maplibre-gl/issues), +contributing pull requests +and [bug reports](https://github.com/maplibre/flutter-maplibre-gl/issues) are +very welcome! diff --git a/maplibre_gl/analysis_options.yaml b/maplibre_gl/analysis_options.yaml new file mode 100644 index 000000000..0caccc81e --- /dev/null +++ b/maplibre_gl/analysis_options.yaml @@ -0,0 +1 @@ +include: ../analysis_options.yaml \ No newline at end of file diff --git a/android/.gitignore b/maplibre_gl/android/.gitignore similarity index 100% rename from android/.gitignore rename to maplibre_gl/android/.gitignore diff --git a/android/build.gradle b/maplibre_gl/android/build.gradle similarity index 100% rename from android/build.gradle rename to maplibre_gl/android/build.gradle diff --git a/android/gradle.properties b/maplibre_gl/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to maplibre_gl/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/maplibre_gl/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.jar rename to maplibre_gl/android/gradle/wrapper/gradle-wrapper.jar diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/maplibre_gl/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to maplibre_gl/android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/settings.gradle b/maplibre_gl/android/settings.gradle similarity index 100% rename from android/settings.gradle rename to maplibre_gl/android/settings.gradle diff --git a/android/src/main/AndroidManifest.xml b/maplibre_gl/android/src/main/AndroidManifest.xml similarity index 100% rename from android/src/main/AndroidManifest.xml rename to maplibre_gl/android/src/main/AndroidManifest.xml diff --git a/android/src/main/java/org/maplibre/maplibregl/Convert.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/Convert.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/Convert.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/Convert.java diff --git a/android/src/main/java/org/maplibre/maplibregl/GlobalMethodHandler.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/GlobalMethodHandler.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/GlobalMethodHandler.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/GlobalMethodHandler.java diff --git a/android/src/main/java/org/maplibre/maplibregl/LayerPropertyConverter.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/LayerPropertyConverter.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/LayerPropertyConverter.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/LayerPropertyConverter.java diff --git a/android/src/main/java/org/maplibre/maplibregl/MapLibreHttpRequestUtil.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreHttpRequestUtil.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/MapLibreHttpRequestUtil.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreHttpRequestUtil.java diff --git a/android/src/main/java/org/maplibre/maplibregl/MapLibreMapBuilder.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapBuilder.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/MapLibreMapBuilder.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapBuilder.java diff --git a/android/src/main/java/org/maplibre/maplibregl/MapLibreMapController.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapController.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/MapLibreMapController.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapController.java diff --git a/android/src/main/java/org/maplibre/maplibregl/MapLibreMapFactory.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapFactory.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/MapLibreMapFactory.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapFactory.java diff --git a/android/src/main/java/org/maplibre/maplibregl/MapLibreMapOptionsSink.kt b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapOptionsSink.kt similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/MapLibreMapOptionsSink.kt rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapOptionsSink.kt diff --git a/android/src/main/java/org/maplibre/maplibregl/MapLibreMapsPlugin.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapsPlugin.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/MapLibreMapsPlugin.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreMapsPlugin.java diff --git a/android/src/main/java/org/maplibre/maplibregl/MapLibreUtils.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreUtils.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/MapLibreUtils.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/MapLibreUtils.java diff --git a/android/src/main/java/org/maplibre/maplibregl/OfflineChannelHandlerImpl.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/OfflineChannelHandlerImpl.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/OfflineChannelHandlerImpl.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/OfflineChannelHandlerImpl.java diff --git a/android/src/main/java/org/maplibre/maplibregl/OfflineManagerUtils.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/OfflineManagerUtils.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/OfflineManagerUtils.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/OfflineManagerUtils.java diff --git a/android/src/main/java/org/maplibre/maplibregl/SourcePropertyConverter.java b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/SourcePropertyConverter.java similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/SourcePropertyConverter.java rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/SourcePropertyConverter.java diff --git a/android/src/main/java/org/maplibre/maplibregl/setMapLanguage.kt b/maplibre_gl/android/src/main/java/org/maplibre/maplibregl/setMapLanguage.kt similarity index 100% rename from android/src/main/java/org/maplibre/maplibregl/setMapLanguage.kt rename to maplibre_gl/android/src/main/java/org/maplibre/maplibregl/setMapLanguage.kt diff --git a/ios/.gitignore b/maplibre_gl/ios/.gitignore similarity index 100% rename from ios/.gitignore rename to maplibre_gl/ios/.gitignore diff --git a/ios/Assets/.gitkeep b/maplibre_gl/ios/Assets/.gitkeep similarity index 100% rename from ios/Assets/.gitkeep rename to maplibre_gl/ios/Assets/.gitkeep diff --git a/ios/maplibre_gl.podspec b/maplibre_gl/ios/maplibre_gl.podspec similarity index 100% rename from ios/maplibre_gl.podspec rename to maplibre_gl/ios/maplibre_gl.podspec diff --git a/ios/maplibre_gl_ios/Package.swift b/maplibre_gl/ios/maplibre_gl_ios/Package.swift similarity index 100% rename from ios/maplibre_gl_ios/Package.swift rename to maplibre_gl/ios/maplibre_gl_ios/Package.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Constants.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Constants.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Constants.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Constants.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Convert.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Convert.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Convert.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Convert.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Enums.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Enums.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Enums.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Enums.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Extensions.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Extensions.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Extensions.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/Extensions.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/LayerPropertyConverter.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/LayerPropertyConverter.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/LayerPropertyConverter.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/LayerPropertyConverter.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MGLMapView+setLanguage.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MGLMapView+setLanguage.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MGLMapView+setLanguage.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MGLMapView+setLanguage.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapController.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapController.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapController.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapController.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapFactory.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapFactory.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapFactory.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapFactory.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapOptionsSink.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapOptionsSink.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapOptionsSink.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapOptionsSink.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapsPlugin.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapsPlugin.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapsPlugin.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MapLibreMapsPlugin.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MethodCallError.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MethodCallError.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MethodCallError.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/MethodCallError.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineChannelHandler.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineChannelHandler.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineChannelHandler.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineChannelHandler.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineManagerUtils.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineManagerUtils.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineManagerUtils.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineManagerUtils.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflinePackDownloadManager.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflinePackDownloadManager.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflinePackDownloadManager.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflinePackDownloadManager.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineRegion.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineRegion.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineRegion.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineRegion.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineRegionDefinition.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineRegionDefinition.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineRegionDefinition.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/OfflineRegionDefinition.swift diff --git a/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/SourcePropertyConverter.swift b/maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/SourcePropertyConverter.swift similarity index 100% rename from ios/maplibre_gl_ios/Sources/maplibre_gl_ios/SourcePropertyConverter.swift rename to maplibre_gl/ios/maplibre_gl_ios/Sources/maplibre_gl_ios/SourcePropertyConverter.swift diff --git a/lib/maplibre_gl.dart b/maplibre_gl/lib/maplibre_gl.dart similarity index 100% rename from lib/maplibre_gl.dart rename to maplibre_gl/lib/maplibre_gl.dart diff --git a/lib/src/annotation_manager.dart b/maplibre_gl/lib/src/annotation_manager.dart similarity index 100% rename from lib/src/annotation_manager.dart rename to maplibre_gl/lib/src/annotation_manager.dart diff --git a/lib/src/color_tools.dart b/maplibre_gl/lib/src/color_tools.dart similarity index 100% rename from lib/src/color_tools.dart rename to maplibre_gl/lib/src/color_tools.dart diff --git a/lib/src/controller.dart b/maplibre_gl/lib/src/controller.dart similarity index 100% rename from lib/src/controller.dart rename to maplibre_gl/lib/src/controller.dart diff --git a/lib/src/download_region_status.dart b/maplibre_gl/lib/src/download_region_status.dart similarity index 100% rename from lib/src/download_region_status.dart rename to maplibre_gl/lib/src/download_region_status.dart diff --git a/lib/src/global.dart b/maplibre_gl/lib/src/global.dart similarity index 100% rename from lib/src/global.dart rename to maplibre_gl/lib/src/global.dart diff --git a/lib/src/layer_expressions.dart b/maplibre_gl/lib/src/layer_expressions.dart similarity index 100% rename from lib/src/layer_expressions.dart rename to maplibre_gl/lib/src/layer_expressions.dart diff --git a/lib/src/layer_properties.dart b/maplibre_gl/lib/src/layer_properties.dart similarity index 100% rename from lib/src/layer_properties.dart rename to maplibre_gl/lib/src/layer_properties.dart diff --git a/lib/src/maplibre_map.dart b/maplibre_gl/lib/src/maplibre_map.dart similarity index 100% rename from lib/src/maplibre_map.dart rename to maplibre_gl/lib/src/maplibre_map.dart diff --git a/lib/src/maplibre_styles.dart b/maplibre_gl/lib/src/maplibre_styles.dart similarity index 100% rename from lib/src/maplibre_styles.dart rename to maplibre_gl/lib/src/maplibre_styles.dart diff --git a/lib/src/offline_region.dart b/maplibre_gl/lib/src/offline_region.dart similarity index 100% rename from lib/src/offline_region.dart rename to maplibre_gl/lib/src/offline_region.dart diff --git a/lib/src/util.dart b/maplibre_gl/lib/src/util.dart similarity index 100% rename from lib/src/util.dart rename to maplibre_gl/lib/src/util.dart diff --git a/maplibre_gl/pubspec.yaml b/maplibre_gl/pubspec.yaml new file mode 100644 index 000000000..c1d1a0634 --- /dev/null +++ b/maplibre_gl/pubspec.yaml @@ -0,0 +1,34 @@ +name: maplibre_gl +description: A Flutter plugin for integrating MapLibre Maps inside a Flutter application on Android, iOS and web platforms. +version: 0.20.0 +repository: https://github.com/maplibre/flutter-maplibre-gl +issue_tracker: https://github.com/maplibre/flutter-maplibre-gl/issues + +environment: + sdk: ">=3.0.0 <4.0.0" + flutter: ">=3.10.0" + +dependencies: + flutter: + sdk: flutter + maplibre_gl_platform_interface: ^0.20.0 + maplibre_gl_web: ^0.20.0 + +dev_dependencies: + very_good_analysis: ^5.0.0 + +flutter: + plugin: + platforms: + android: + package: org.maplibre.maplibregl + pluginClass: MapLibreMapsPlugin + ios: + pluginClass: MapLibreMapsPlugin + web: + default_package: maplibre_gl_web + +platforms: + android: + ios: + web: diff --git a/maplibre_gl_web/pubspec_overrides.yaml b/maplibre_gl_web/pubspec_overrides.yaml deleted file mode 100644 index e54872cb8..000000000 --- a/maplibre_gl_web/pubspec_overrides.yaml +++ /dev/null @@ -1,3 +0,0 @@ -dependency_overrides: - maplibre_gl_platform_interface: - path: ../maplibre_gl_platform_interface diff --git a/melos.yaml b/melos.yaml new file mode 100644 index 000000000..eb97482d0 --- /dev/null +++ b/melos.yaml @@ -0,0 +1,8 @@ +name: maplibre_gl_workspace + +packages: + - example + - scripts + - maplibre_gl + - maplibre_gl_platform_interface + - maplibre_gl_web \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index c1d1a0634..874f73d3f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,34 +1,11 @@ -name: maplibre_gl -description: A Flutter plugin for integrating MapLibre Maps inside a Flutter application on Android, iOS and web platforms. -version: 0.20.0 +name: maplibre_gl_workspace +publish_to: 'none' repository: https://github.com/maplibre/flutter-maplibre-gl issue_tracker: https://github.com/maplibre/flutter-maplibre-gl/issues environment: - sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.10.0" - -dependencies: - flutter: - sdk: flutter - maplibre_gl_platform_interface: ^0.20.0 - maplibre_gl_web: ^0.20.0 - + sdk: '>=3.0.0 <4.0.0' + dev_dependencies: + melos: ^6.0.0 very_good_analysis: ^5.0.0 - -flutter: - plugin: - platforms: - android: - package: org.maplibre.maplibregl - pluginClass: MapLibreMapsPlugin - ios: - pluginClass: MapLibreMapsPlugin - web: - default_package: maplibre_gl_web - -platforms: - android: - ios: - web: diff --git a/pubspec_overrides.yaml b/pubspec_overrides.yaml deleted file mode 100644 index e8fff836d..000000000 --- a/pubspec_overrides.yaml +++ /dev/null @@ -1,5 +0,0 @@ -dependency_overrides: - maplibre_gl_platform_interface: - path: ./maplibre_gl_platform_interface - maplibre_gl_web: - path: ./maplibre_gl_web diff --git a/scripts/lib/generate.dart b/scripts/lib/generate.dart index ba657b0a7..9bf85d17a 100644 --- a/scripts/lib/generate.dart +++ b/scripts/lib/generate.dart @@ -58,10 +58,10 @@ main() async { }.map((p) => {"property": p}).toList(); const templates = [ - "android/src/main/java/com/mapbox/mapboxgl/LayerPropertyConverter.java", - "ios/Classes/LayerPropertyConverter.swift", - "lib/src/layer_expressions.dart", - "lib/src/layer_properties.dart", + "maplibre_gl/android/src/main/java/com/mapbox/mapboxgl/LayerPropertyConverter.java", + "maplibre_gl/ios/Classes/LayerPropertyConverter.swift", + "maplibre_gl/lib/src/layer_expressions.dart", + "maplibre_gl/lib/src/layer_properties.dart", "maplibre_gl_web/lib/src/layer_tools.dart", "maplibre_gl_platform_interface/lib/src/source_properties.dart", ];