From 7c4cd5769876b8849f52f5baa14e39b1cfddd117 Mon Sep 17 00:00:00 2001 From: Rexios Date: Wed, 23 Feb 2022 21:34:51 -0500 Subject: [PATCH 01/18] Added options to GoogleMap --- .../google_maps_flutter/CHANGELOG.md | 3 ++- .../lib/src/google_map.dart | 12 ++++++++++++ .../google_maps_flutter/pubspec.yaml | 2 +- .../CHANGELOG.md | 6 +++++- .../lib/src/types/gesture_handling.dart | 18 ++++++++++++++++++ .../lib/src/types/types.dart | 1 + .../pubspec.yaml | 2 +- .../google_maps_flutter_web/CHANGELOG.md | 4 ++++ .../google_maps_flutter_web/pubspec.yaml | 2 +- 9 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index b9178a74bb70..173135e10b51 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,7 +1,8 @@ -## NEXT +## 2.2.0 * Removes dependencies from `pubspec.yaml` that are only needed in `example/pubspec.yaml` * Updates Android compileSdkVersion to 31. +* Added options for gesture handling and tilt controls ## 2.1.1 diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index b153832426dd..d839570e01a9 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -86,6 +86,7 @@ class GoogleMap extends StatefulWidget { required this.initialCameraPosition, this.onMapCreated, this.gestureRecognizers = const >{}, + this.gestureHandling, this.compassEnabled = true, this.mapToolbarEnabled = true, this.cameraTargetBounds = CameraTargetBounds.unbounded, @@ -97,6 +98,7 @@ class GoogleMap extends StatefulWidget { this.zoomGesturesEnabled = true, this.liteModeEnabled = false, this.tiltGesturesEnabled = true, + this.tiltControlsEnabled = true, this.myLocationEnabled = false, this.myLocationButtonEnabled = true, this.layoutDirection, @@ -173,6 +175,11 @@ class GoogleMap extends StatefulWidget { /// True if the map view should respond to tilt gestures. final bool tiltGesturesEnabled; + /// True if the map should show tilt controls. Web only. + /// + /// This interrupts map dragging if the [GoogleMap] is rebuilt while dragging. + final bool tiltControlsEnabled; + /// Padding to be set on map. See https://developers.google.com/maps/documentation/android-sdk/map#map_padding for more details. final EdgeInsets padding; @@ -276,6 +283,11 @@ class GoogleMap extends StatefulWidget { /// were not claimed by any other gesture recognizer. final Set> gestureRecognizers; + /// This setting controls how the API handles gestures on the map. Web only. + /// + /// See [GestureHandling] for more details. + final GestureHandling? gestureHandling; + /// Creates a [State] for this [GoogleMap]. @override State createState() => _GoogleMapState(); diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index e8bd391810d7..89a38c681d5d 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter description: A Flutter plugin for integrating Google Maps in iOS and Android applications. repository: https://github.com/flutter/plugins/tree/main/packages/google_maps_flutter/google_maps_flutter issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.1.1 +version: 2.2.0 environment: sdk: ">=2.14.0 <3.0.0" diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index d1b4ef8c18cf..6340e58e7814 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -1,6 +1,10 @@ +## 2.2.0 + +* Added options for gesture handling and tilt controls + ## 2.1.5 -Removes dependency on `meta`. +* Removes dependency on `meta`. ## 2.1.4 diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart new file mode 100644 index 000000000000..73c544aa1fa7 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart @@ -0,0 +1,18 @@ +/// This setting controls how the API handles gestures on the map +enum GestureHandling { + /// Scroll events and one-finger touch gestures scroll the page, and do not + /// zoom or pan the map. Two-finger touch gestures pan and zoom the map. + /// Scroll events with a ctrl key or ⌘ key pressed zoom the map. In this mode + /// the map cooperates with the page. + cooperative, + + /// All touch gestures and scroll events pan or zoom the map. + greedy, + + /// The map cannot be panned or zoomed by user gestures. + none, + + /// (default) Gesture handling is either cooperative or greedy, depending on + /// whether the page is scrollable or in an iframe. + auto, +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index 5e2e4c234ccf..1df1ee85a6a9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -9,6 +9,7 @@ export 'camera.dart'; export 'cap.dart'; export 'circle_updates.dart'; export 'circle.dart'; +export 'gesture_handling.dart'; export 'joint_type.dart'; export 'location.dart'; export 'maps_object_updates.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml index 6125dd43d9f6..9c9402302ca7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/main/packages/google_maps_fl issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 2.1.5 +version: 2.2.0 environment: sdk: '>=2.12.0 <3.0.0' diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index 8a3b94151de2..5698e3f34548 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.3 + +* Added options for gesture handling and tilt controls + ## 0.3.2+1 * Removes dependency on `meta`. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index 2780175d29e2..9a6814578859 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter_web description: Web platform implementation of google_maps_flutter repository: https://github.com/flutter/plugins/tree/main/packages/google_maps_flutter/google_maps_flutter_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 0.3.2+1 +version: 0.3.3 environment: sdk: ">=2.12.0 <3.0.0" From d40968fc9173d9ec28cd6ebc95f646e8bd767dd4 Mon Sep 17 00:00:00 2001 From: Rexios Date: Wed, 23 Feb 2022 21:59:36 -0500 Subject: [PATCH 02/18] Use the options in google_maps_flutter_web --- .../google_maps_flutter/CHANGELOG.md | 2 +- .../lib/google_maps_flutter.dart | 1 + .../google_maps_flutter/lib/src/google_map.dart | 12 ++++++++++-- .../CHANGELOG.md | 2 +- .../google_maps_flutter_web/lib/src/convert.dart | 15 +++++++++++---- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index 173135e10b51..ab8b2d517216 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -2,7 +2,7 @@ * Removes dependencies from `pubspec.yaml` that are only needed in `example/pubspec.yaml` * Updates Android compileSdkVersion to 31. -* Added options for gesture handling and tilt controls +* Added options for gesture handling and tilt controls on web ## 2.1.1 diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index 93bb0566dd1f..704d0d94b570 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -28,6 +28,7 @@ export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf Cap, Circle, CircleId, + GestureHandling, InfoWindow, JointType, LatLng, diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index d839570e01a9..5f0b88cc9806 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -284,7 +284,7 @@ class GoogleMap extends StatefulWidget { final Set> gestureRecognizers; /// This setting controls how the API handles gestures on the map. Web only. - /// + /// /// See [GestureHandling] for more details. final GestureHandling? gestureHandling; @@ -532,7 +532,8 @@ class _GoogleMapState extends State { /// Configuration options for the GoogleMaps user interface. class _GoogleMapOptions { _GoogleMapOptions.fromWidget(GoogleMap map) - : compassEnabled = map.compassEnabled, + : gestureHandling = map.gestureHandling, + compassEnabled = map.compassEnabled, mapToolbarEnabled = map.mapToolbarEnabled, cameraTargetBounds = map.cameraTargetBounds, mapType = map.mapType, @@ -540,6 +541,7 @@ class _GoogleMapOptions { rotateGesturesEnabled = map.rotateGesturesEnabled, scrollGesturesEnabled = map.scrollGesturesEnabled, tiltGesturesEnabled = map.tiltGesturesEnabled, + tiltControlsEnabled = map.tiltControlsEnabled, trackCameraPosition = map.onCameraMove != null, zoomControlsEnabled = map.zoomControlsEnabled, zoomGesturesEnabled = map.zoomGesturesEnabled, @@ -552,6 +554,8 @@ class _GoogleMapOptions { buildingsEnabled = map.buildingsEnabled, assert(!map.liteModeEnabled || Platform.isAndroid); + final GestureHandling? gestureHandling; + final bool compassEnabled; final bool mapToolbarEnabled; @@ -568,6 +572,8 @@ class _GoogleMapOptions { final bool tiltGesturesEnabled; + final bool tiltControlsEnabled; + final bool trackCameraPosition; final bool zoomControlsEnabled; @@ -590,6 +596,7 @@ class _GoogleMapOptions { Map toMap() { return { + 'gestureHandling': gestureHandling?.name, 'compassEnabled': compassEnabled, 'mapToolbarEnabled': mapToolbarEnabled, 'cameraTargetBounds': cameraTargetBounds.toJson(), @@ -598,6 +605,7 @@ class _GoogleMapOptions { 'rotateGesturesEnabled': rotateGesturesEnabled, 'scrollGesturesEnabled': scrollGesturesEnabled, 'tiltGesturesEnabled': tiltGesturesEnabled, + 'tiltControlsEnabled': tiltControlsEnabled, 'zoomControlsEnabled': zoomControlsEnabled, 'zoomGesturesEnabled': zoomGesturesEnabled, 'liteModeEnabled': liteModeEnabled, diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index 6340e58e7814..8509ab668293 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -1,6 +1,6 @@ ## 2.2.0 -* Added options for gesture handling and tilt controls +* Added options for gesture handling and tilt controls on web ## 2.1.5 diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index c026a03be804..b4b61f239f07 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -51,7 +51,7 @@ double _getCssOpacity(Color color) { // myLocationEnabled needs to be built through dart:html navigator.geolocation // See: https://api.dart.dev/stable/2.8.4/dart-html/Geolocation-class.html // trafficEnabled is handled when creating the GMap object, since it needs to be added as a layer. -// trackCameraPosition is just a boolan value that indicates if the map has an onCameraMove handler. +// trackCameraPosition is just a boolean value that indicates if the map has an onCameraMove handler. // indoorViewEnabled seems to not have an equivalent in web // buildingsEnabled seems to not have an equivalent in web // padding seems to behave differently in web than mobile. You can't move UI elements in web. @@ -81,11 +81,18 @@ gmaps.MapOptions _rawOptionsToGmapsOptions(Map rawOptions) { options.styles = rawOptions['styles']; } - if (rawOptions['scrollGesturesEnabled'] == false || + if (rawOptions['gestureHandling'] != null) { + options.gestureHandling = rawOptions['gestureHandling']; + } else if (rawOptions['scrollGesturesEnabled'] == false || rawOptions['zoomGesturesEnabled'] == false) { - options.gestureHandling = 'none'; + options.gestureHandling = GestureHandling.none.name; } else { - options.gestureHandling = 'auto'; + options.gestureHandling = GestureHandling.auto.name; + } + + if (rawOptions['tiltControlsEnabled'] == false) { + options.rotateControl = false; + options.tilt = 0; } // These don't have any rawOptions entry, but they seem to be off in the native maps. From 81bdeb209e5694ec9780a1a3983419c70468af90 Mon Sep 17 00:00:00 2001 From: Rexios Date: Wed, 23 Feb 2022 22:13:12 -0500 Subject: [PATCH 03/18] Tests --- .../google_maps_flutter/pubspec.yaml | 3 ++- .../google_maps_controller_test.dart | 19 +++++++++++++++++++ .../google_maps_flutter_web/pubspec.yaml | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 89a38c681d5d..a5752e982a9b 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -21,7 +21,8 @@ dependencies: flutter: sdk: flutter flutter_plugin_android_lifecycle: ^2.0.1 - google_maps_flutter_platform_interface: ^2.1.2 + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface dev_dependencies: flutter_test: diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 39aa641b10e4..605a8e0055f5 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -359,6 +359,7 @@ void main() { controller = _createController(options: { 'mapType': 2, 'zoomControlsEnabled': true, + 'tiltControlsEnabled': false, }); controller.debugSetOverrides(createMap: (_, options) { capturedOptions = options; @@ -373,6 +374,8 @@ void main() { expect(capturedOptions!.gestureHandling, 'auto', reason: 'by default the map handles zoom/pan gestures internally'); + expect(capturedOptions!.rotateControl, false); + expect(capturedOptions!.tilt, 0); }); testWidgets('disables gestureHandling with scrollGesturesEnabled false', @@ -393,6 +396,22 @@ void main() { 'disabling scroll gestures disables all gesture handling'); }); + testWidgets('translates gestureHandling option', + (WidgetTester tester) async { + controller = _createController(options: { + 'gestureHandling': GestureHandling.greedy.name, + }); + controller.debugSetOverrides(createMap: (_, options) { + capturedOptions = options; + return map; + }); + + controller.init(); + + expect(capturedOptions, isNotNull); + expect(capturedOptions!.gestureHandling, 'greedy'); + }); + testWidgets('disables gestureHandling with zoomGesturesEnabled false', (WidgetTester tester) async { controller = _createController(options: { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index 9a6814578859..d173ec71a51b 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -21,7 +21,8 @@ dependencies: sdk: flutter flutter_web_plugins: sdk: flutter - google_maps_flutter_platform_interface: ^2.1.2 + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface google_maps: ^5.2.0 pedantic: ^1.10.0 sanitize_html: ^2.0.0 From 92c83278b070a6caa2b76a843e04099fda60b29a Mon Sep 17 00:00:00 2001 From: Rexios Date: Wed, 23 Feb 2022 22:30:18 -0500 Subject: [PATCH 04/18] Cherry-picked google_maps_flutter_platform_interface changes from feature/more-web-config-options --- .../CHANGELOG.md | 6 +++++- .../lib/src/types/gesture_handling.dart | 18 ++++++++++++++++++ .../lib/src/types/types.dart | 1 + .../pubspec.yaml | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index d1b4ef8c18cf..8509ab668293 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -1,6 +1,10 @@ +## 2.2.0 + +* Added options for gesture handling and tilt controls on web + ## 2.1.5 -Removes dependency on `meta`. +* Removes dependency on `meta`. ## 2.1.4 diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart new file mode 100644 index 000000000000..73c544aa1fa7 --- /dev/null +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart @@ -0,0 +1,18 @@ +/// This setting controls how the API handles gestures on the map +enum GestureHandling { + /// Scroll events and one-finger touch gestures scroll the page, and do not + /// zoom or pan the map. Two-finger touch gestures pan and zoom the map. + /// Scroll events with a ctrl key or ⌘ key pressed zoom the map. In this mode + /// the map cooperates with the page. + cooperative, + + /// All touch gestures and scroll events pan or zoom the map. + greedy, + + /// The map cannot be panned or zoomed by user gestures. + none, + + /// (default) Gesture handling is either cooperative or greedy, depending on + /// whether the page is scrollable or in an iframe. + auto, +} diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index 5e2e4c234ccf..1df1ee85a6a9 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -9,6 +9,7 @@ export 'camera.dart'; export 'cap.dart'; export 'circle_updates.dart'; export 'circle.dart'; +export 'gesture_handling.dart'; export 'joint_type.dart'; export 'location.dart'; export 'maps_object_updates.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml index 6125dd43d9f6..9c9402302ca7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/main/packages/google_maps_fl issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 2.1.5 +version: 2.2.0 environment: sdk: '>=2.12.0 <3.0.0' From 2d99561bdc0103fcc8f32c0257799a52a82ede7c Mon Sep 17 00:00:00 2001 From: Rexios Date: Tue, 15 Mar 2022 16:57:45 -0400 Subject: [PATCH 05/18] Updated changelogs --- packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md | 3 ++- .../google_maps_flutter_platform_interface/CHANGELOG.md | 3 ++- .../google_maps_flutter/google_maps_flutter_web/CHANGELOG.md | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index ab8b2d517216..c56d9936d139 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,8 +1,9 @@ + ## 2.2.0 * Removes dependencies from `pubspec.yaml` that are only needed in `example/pubspec.yaml` * Updates Android compileSdkVersion to 31. -* Added options for gesture handling and tilt controls on web +* Adds options for gesture handling and tilt controls on web. ## 2.1.1 diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md index 8509ab668293..0258d11a45c3 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md @@ -1,6 +1,7 @@ + ## 2.2.0 -* Added options for gesture handling and tilt controls on web +* Adds options for gesture handling and tilt controls on web. ## 2.1.5 diff --git a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md index 5698e3f34548..83d2d1afc9e4 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_web/CHANGELOG.md @@ -1,6 +1,7 @@ + ## 0.3.3 -* Added options for gesture handling and tilt controls +* Adds options for gesture handling and tilt controls. ## 0.3.2+1 From 66130ca23f719d8936bb177cbb1ab7e3f73e4cd9 Mon Sep 17 00:00:00 2001 From: Rexios Date: Wed, 16 Mar 2022 20:24:00 -0400 Subject: [PATCH 06/18] More clear doc comment for tiltControlsEnabled --- .../google_maps_flutter/lib/src/google_map.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index 790887e2e056..c7beae102abf 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -180,7 +180,8 @@ class GoogleMap extends StatefulWidget { /// True if the map should show tilt controls. Web only. /// - /// This interrupts map dragging if the [GoogleMap] is rebuilt while dragging. + /// Disabling this will cause map dragging to be interrupted if the + /// [GoogleMap] is rebuilt while dragging. final bool tiltControlsEnabled; /// Padding to be set on map. See https://developers.google.com/maps/documentation/android-sdk/map#map_padding for more details. From 4931805816b7e60d3a5b3dabb2b4eb8c69bb30e4 Mon Sep 17 00:00:00 2001 From: Rexios Date: Tue, 5 Apr 2022 19:41:00 -0400 Subject: [PATCH 07/18] Update CHANGELOG.md --- packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md index e60a90ad143e..834eba3314c3 100644 --- a/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md @@ -1,3 +1,4 @@ + ## 2.2.0 * Adds options for gesture handling and tilt controls on web. From f53fdca3c84d60131274799e8c680d819551c954 Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 23 May 2022 16:32:25 -0400 Subject: [PATCH 08/18] Fixed analysis issues --- .../google_maps_controller_test.dart | 21 ++++++++++--------- .../google_maps_plugin_test.dart | 16 +++++++------- .../lib/src/convert.dart | 2 +- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index ecd145a5b2b3..3ee256e1a696 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -145,8 +145,8 @@ void main() { expect(() { controller.updateCircles( CircleUpdates.from( - {}, - {}, + const {}, + const {}, ), ); }, throwsAssertionError); @@ -159,8 +159,8 @@ void main() { expect(() { controller.updatePolygons( PolygonUpdates.from( - {}, - {}, + const {}, + const {}, ), ); }, throwsAssertionError); @@ -173,8 +173,8 @@ void main() { expect(() { controller.updatePolylines( PolylineUpdates.from( - {}, - {}, + const {}, + const {}, ), ); }, throwsAssertionError); @@ -187,8 +187,8 @@ void main() { expect(() { controller.updateMarkers( MarkerUpdates.from( - {}, - {}, + const {}, + const {}, ), ); }, throwsAssertionError); @@ -429,10 +429,11 @@ void main() { testWidgets('translates gestureHandling option', (WidgetTester tester) async { - controller = _createController(options: { + controller = _createController(options: { 'gestureHandling': GestureHandling.greedy.name, }); - controller.debugSetOverrides(createMap: (_, options) { + controller.debugSetOverrides( + createMap: (_, gmaps.MapOptions options) { capturedOptions = options; return map; }); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart index f0fd5a232e00..f28a6041da2a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_plugin_test.dart @@ -233,8 +233,8 @@ void main() { // Geometry testWidgets('updateMarkers', (WidgetTester tester) async { final MarkerUpdates expectedUpdates = MarkerUpdates.from( - {}, - {}, + const {}, + const {}, ); await plugin.updateMarkers(expectedUpdates, mapId: mapId); @@ -243,8 +243,8 @@ void main() { }); testWidgets('updatePolygons', (WidgetTester tester) async { final PolygonUpdates expectedUpdates = PolygonUpdates.from( - {}, - {}, + const {}, + const {}, ); await plugin.updatePolygons(expectedUpdates, mapId: mapId); @@ -253,8 +253,8 @@ void main() { }); testWidgets('updatePolylines', (WidgetTester tester) async { final PolylineUpdates expectedUpdates = PolylineUpdates.from( - {}, - {}, + const {}, + const {}, ); await plugin.updatePolylines(expectedUpdates, mapId: mapId); @@ -263,8 +263,8 @@ void main() { }); testWidgets('updateCircles', (WidgetTester tester) async { final CircleUpdates expectedUpdates = CircleUpdates.from( - {}, - {}, + const {}, + const {}, ); await plugin.updateCircles(expectedUpdates, mapId: mapId); diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index 891dfd669e45..fd29d3ab3197 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -84,7 +84,7 @@ gmaps.MapOptions _rawOptionsToGmapsOptions(Map rawOptions) { } if (rawOptions['gestureHandling'] != null) { - options.gestureHandling = rawOptions['gestureHandling']; + options.gestureHandling = rawOptions['gestureHandling'] as String?; } else if (rawOptions['scrollGesturesEnabled'] == false || rawOptions['zoomGesturesEnabled'] == false) { options.gestureHandling = GestureHandling.none.name; From 3ed3277174259b4f5cc792bb7a9ea194c85dba5a Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 23 May 2022 16:58:25 -0400 Subject: [PATCH 09/18] Refactored GestureHandling to WebGestureHandling --- .../google_maps_flutter/lib/google_maps_flutter.dart | 2 +- .../google_maps_flutter/lib/src/google_map.dart | 12 ++++++------ .../lib/src/types/types.dart | 2 +- ...sture_handling.dart => web_gesture_handling.dart} | 2 +- .../google_maps_controller_test.dart | 4 ++-- .../google_maps_flutter_web/lib/src/convert.dart | 8 ++++---- 6 files changed, 15 insertions(+), 15 deletions(-) rename packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/{gesture_handling.dart => web_gesture_handling.dart} (96%) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart index 3b792eb9055e..ea86ea4c10e4 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/google_maps_flutter.dart @@ -26,7 +26,7 @@ export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf Cap, Circle, CircleId, - GestureHandling, + WebGestureHandling, InfoWindow, JointType, LatLng, diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index c7beae102abf..f997428d6697 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -89,7 +89,7 @@ class GoogleMap extends StatefulWidget { required this.initialCameraPosition, this.onMapCreated, this.gestureRecognizers = const >{}, - this.gestureHandling, + this.webGestureHandling, this.compassEnabled = true, this.mapToolbarEnabled = true, this.cameraTargetBounds = CameraTargetBounds.unbounded, @@ -289,8 +289,8 @@ class GoogleMap extends StatefulWidget { /// This setting controls how the API handles gestures on the map. Web only. /// - /// See [GestureHandling] for more details. - final GestureHandling? gestureHandling; + /// See [WebGestureHandling] for more details. + final WebGestureHandling? webGestureHandling; /// Creates a [State] for this [GoogleMap]. @override @@ -540,7 +540,7 @@ class _GoogleMapState extends State { /// Configuration options for the GoogleMaps user interface. class _GoogleMapOptions { _GoogleMapOptions.fromWidget(GoogleMap map) - : gestureHandling = map.gestureHandling, + : webGestureHandling = map.webGestureHandling, compassEnabled = map.compassEnabled, mapToolbarEnabled = map.mapToolbarEnabled, cameraTargetBounds = map.cameraTargetBounds, @@ -562,7 +562,7 @@ class _GoogleMapOptions { buildingsEnabled = map.buildingsEnabled, assert(!map.liteModeEnabled || Platform.isAndroid); - final GestureHandling? gestureHandling; + final WebGestureHandling? webGestureHandling; final bool compassEnabled; @@ -604,7 +604,7 @@ class _GoogleMapOptions { Map toMap() { return { - 'gestureHandling': gestureHandling?.name, + 'webGestureHandling': webGestureHandling?.name, 'compassEnabled': compassEnabled, 'mapToolbarEnabled': mapToolbarEnabled, 'cameraTargetBounds': cameraTargetBounds.toJson(), diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index abc2a70fad35..fe2a98f6c94e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -9,7 +9,7 @@ export 'camera.dart'; export 'cap.dart'; export 'circle.dart'; export 'circle_updates.dart'; -export 'gesture_handling.dart'; +export 'web_gesture_handling.dart'; export 'joint_type.dart'; export 'location.dart'; export 'maps_object.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/web_gesture_handling.dart similarity index 96% rename from packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart rename to packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/web_gesture_handling.dart index 73c544aa1fa7..27ba73106994 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/gesture_handling.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/web_gesture_handling.dart @@ -1,5 +1,5 @@ /// This setting controls how the API handles gestures on the map -enum GestureHandling { +enum WebGestureHandling { /// Scroll events and one-finger touch gestures scroll the page, and do not /// zoom or pan the map. Two-finger touch gestures pan and zoom the map. /// Scroll events with a ctrl key or ⌘ key pressed zoom the map. In this mode diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 3ee256e1a696..1c54d8d1f8ca 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -427,10 +427,10 @@ void main() { 'disabling scroll gestures disables all gesture handling'); }); - testWidgets('translates gestureHandling option', + testWidgets('translates webGestureHandling option', (WidgetTester tester) async { controller = _createController(options: { - 'gestureHandling': GestureHandling.greedy.name, + 'webGestureHandling': WebGestureHandling.greedy.name, }); controller.debugSetOverrides( createMap: (_, gmaps.MapOptions options) { diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index fd29d3ab3197..d71fbd87374a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -83,13 +83,13 @@ gmaps.MapOptions _rawOptionsToGmapsOptions(Map rawOptions) { options.styles = rawOptions['styles'] as List?; } - if (rawOptions['gestureHandling'] != null) { - options.gestureHandling = rawOptions['gestureHandling'] as String?; + if (rawOptions['webGestureHandling'] != null) { + options.gestureHandling = rawOptions['webGestureHandling'] as String?; } else if (rawOptions['scrollGesturesEnabled'] == false || rawOptions['zoomGesturesEnabled'] == false) { - options.gestureHandling = GestureHandling.none.name; + options.gestureHandling = WebGestureHandling.none.name; } else { - options.gestureHandling = GestureHandling.auto.name; + options.gestureHandling = WebGestureHandling.auto.name; } if (rawOptions['tiltControlsEnabled'] == false) { From 7c6934d5b015086e54c934303ce7b5aa9741048f Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 23 May 2022 17:27:08 -0400 Subject: [PATCH 10/18] Added license text to web_gesture_handling.dart and organized imports --- .../lib/src/types/types.dart | 2 +- .../lib/src/types/web_gesture_handling.dart | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart index fe2a98f6c94e..cefcab211bea 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/types.dart @@ -9,7 +9,6 @@ export 'camera.dart'; export 'cap.dart'; export 'circle.dart'; export 'circle_updates.dart'; -export 'web_gesture_handling.dart'; export 'joint_type.dart'; export 'location.dart'; export 'maps_object.dart'; @@ -32,3 +31,4 @@ export 'utils/marker.dart'; export 'utils/polygon.dart'; export 'utils/polyline.dart'; export 'utils/tile_overlay.dart'; +export 'web_gesture_handling.dart'; diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/web_gesture_handling.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/web_gesture_handling.dart index 27ba73106994..c978f9153096 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/web_gesture_handling.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/web_gesture_handling.dart @@ -1,3 +1,7 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + /// This setting controls how the API handles gestures on the map enum WebGestureHandling { /// Scroll events and one-finger touch gestures scroll the page, and do not From e47ba6213d76b832c70df80b5c2c110b14315d65 Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 23 May 2022 21:53:28 -0400 Subject: [PATCH 11/18] Refactored 45 degree imagery option --- .../lib/src/google_map.dart | 15 +++++-------- .../google_maps_controller_test.dart | 22 +++++++++++++++++-- .../lib/src/convert.dart | 6 ++--- .../lib/src/google_maps_controller.dart | 5 +++++ 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart index f997428d6697..116accdc85b1 100644 --- a/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart +++ b/packages/google_maps_flutter/google_maps_flutter/lib/src/google_map.dart @@ -101,7 +101,7 @@ class GoogleMap extends StatefulWidget { this.zoomGesturesEnabled = true, this.liteModeEnabled = false, this.tiltGesturesEnabled = true, - this.tiltControlsEnabled = true, + this.fortyFiveDegreeImageryEnabled = false, this.myLocationEnabled = false, this.myLocationButtonEnabled = true, this.layoutDirection, @@ -178,11 +178,8 @@ class GoogleMap extends StatefulWidget { /// True if the map view should respond to tilt gestures. final bool tiltGesturesEnabled; - /// True if the map should show tilt controls. Web only. - /// - /// Disabling this will cause map dragging to be interrupted if the - /// [GoogleMap] is rebuilt while dragging. - final bool tiltControlsEnabled; + /// True if 45 degree imagery should be enabled. Web only. + final bool fortyFiveDegreeImageryEnabled; /// Padding to be set on map. See https://developers.google.com/maps/documentation/android-sdk/map#map_padding for more details. final EdgeInsets padding; @@ -549,7 +546,7 @@ class _GoogleMapOptions { rotateGesturesEnabled = map.rotateGesturesEnabled, scrollGesturesEnabled = map.scrollGesturesEnabled, tiltGesturesEnabled = map.tiltGesturesEnabled, - tiltControlsEnabled = map.tiltControlsEnabled, + fortyFiveDegreeImageryEnabled = map.fortyFiveDegreeImageryEnabled, trackCameraPosition = map.onCameraMove != null, zoomControlsEnabled = map.zoomControlsEnabled, zoomGesturesEnabled = map.zoomGesturesEnabled, @@ -580,7 +577,7 @@ class _GoogleMapOptions { final bool tiltGesturesEnabled; - final bool tiltControlsEnabled; + final bool fortyFiveDegreeImageryEnabled; final bool trackCameraPosition; @@ -613,7 +610,7 @@ class _GoogleMapOptions { 'rotateGesturesEnabled': rotateGesturesEnabled, 'scrollGesturesEnabled': scrollGesturesEnabled, 'tiltGesturesEnabled': tiltGesturesEnabled, - 'tiltControlsEnabled': tiltControlsEnabled, + 'fortyFiveDegreeImageryEnabled': fortyFiveDegreeImageryEnabled, 'zoomControlsEnabled': zoomControlsEnabled, 'zoomGesturesEnabled': zoomGesturesEnabled, 'liteModeEnabled': liteModeEnabled, diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 1c54d8d1f8ca..302f1bdd3a70 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -388,7 +388,7 @@ void main() { controller = _createController(options: { 'mapType': 2, 'zoomControlsEnabled': true, - 'tiltControlsEnabled': false, + 'fortyFiveDegreeImageryEnabled': false, }); controller.debugSetOverrides( createMap: (_, gmaps.MapOptions options) { @@ -427,9 +427,27 @@ void main() { 'disabling scroll gestures disables all gesture handling'); }); + testWidgets('translates fortyFiveDegreeImageryEnabled option', + (WidgetTester tester) async { + controller = _createController(options: { + 'fortyFiveDegreeImageryEnabled': true, + }); + controller.debugSetOverrides( + createMap: (_, gmaps.MapOptions options) { + capturedOptions = options; + return map; + }); + + controller.init(); + + expect(capturedOptions, isNotNull); + expect(capturedOptions!.rotateControl, true); + expect(capturedOptions!.tilt, isNull); + }); + testWidgets('translates webGestureHandling option', (WidgetTester tester) async { - controller = _createController(options: { + controller = _createController(options: { 'webGestureHandling': WebGestureHandling.greedy.name, }); controller.debugSetOverrides( diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index d71fbd87374a..179c4fa99c3c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -92,9 +92,9 @@ gmaps.MapOptions _rawOptionsToGmapsOptions(Map rawOptions) { options.gestureHandling = WebGestureHandling.auto.name; } - if (rawOptions['tiltControlsEnabled'] == false) { - options.rotateControl = false; - options.tilt = 0; + if (rawOptions['fortyFiveDegreeImageryEnabled'] != null) { + options.rotateControl = + rawOptions['fortyFiveDegreeImageryEnabled'] as bool?; } // These don't have any rawOptions entry, but they seem to be off in the native maps. diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart index b7e902014281..4ba4a26a96a6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/google_maps_controller.dart @@ -162,6 +162,11 @@ class GoogleMapController { // Initial position can only to be set here! options = _applyInitialPosition(_initialCameraPosition, options); + // Fully disable 45 degree imagery if desired + if (options.rotateControl == false) { + options.tilt = 0; + } + // Create the map... final gmaps.GMap map = _createMap(_div, options); _googleMap = map; From 70121cd8d39f2c1d2ee2c6446e7445285466cb76 Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 11 Jul 2022 15:59:21 -0400 Subject: [PATCH 12/18] Removed extra if condition and updated documentation --- .../lib/src/types/map_configuration.dart | 4 ++++ .../google_maps_flutter_web/lib/src/convert.dart | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart index e7d2e6288650..45d016b692e6 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart @@ -60,6 +60,8 @@ class MapConfiguration { final bool? rotateGesturesEnabled; /// True if scroll gestures should be enabled. + /// + /// Android/iOS only. For web, see [webGestureHandling]. final bool? scrollGesturesEnabled; /// True if tilt gestures should be enabled. @@ -75,6 +77,8 @@ class MapConfiguration { final bool? zoomControlsEnabled; /// True if zoom gestures should be enabled. + /// + /// Android/iOS only. For web, see [webGestureHandling]. final bool? zoomGesturesEnabled; /// True if the map should use Lite Mode, showing a limited-interactivity diff --git a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart index d99a20951d6e..e90f282da66d 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/lib/src/convert.dart @@ -72,9 +72,6 @@ gmaps.MapOptions _configurationAndStyleToGmapsOptions( if (configuration.webGestureHandling != null) { options.gestureHandling = configuration.webGestureHandling!.name; - } else if (configuration.scrollGesturesEnabled == false || - configuration.zoomGesturesEnabled == false) { - options.gestureHandling = WebGestureHandling.none.name; } else { options.gestureHandling = WebGestureHandling.auto.name; } From 8b9c69f01c3f97bafe537d209a98aae8f7b2ff88 Mon Sep 17 00:00:00 2001 From: Rexios Date: Thu, 14 Jul 2022 19:20:03 -0400 Subject: [PATCH 13/18] Formatting --- .../lib/src/types/map_configuration.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart index 45d016b692e6..5c75c4dfb2f2 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart @@ -60,7 +60,7 @@ class MapConfiguration { final bool? rotateGesturesEnabled; /// True if scroll gestures should be enabled. - /// + /// /// Android/iOS only. For web, see [webGestureHandling]. final bool? scrollGesturesEnabled; @@ -77,7 +77,7 @@ class MapConfiguration { final bool? zoomControlsEnabled; /// True if zoom gestures should be enabled. - /// + /// /// Android/iOS only. For web, see [webGestureHandling]. final bool? zoomGesturesEnabled; From 3577e267ba24dcaa1584f76457b18fffc67d03da Mon Sep 17 00:00:00 2001 From: Rexios Date: Fri, 15 Jul 2022 11:29:40 -0400 Subject: [PATCH 14/18] Removed now irrelevant tests --- .../google_maps_controller_test.dart | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 81df4811569c..cb334483aea1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -408,26 +408,6 @@ void main() { expect(capturedOptions!.tilt, 0); }); - testWidgets('disables gestureHandling with scrollGesturesEnabled false', - (WidgetTester tester) async { - controller = _createController( - mapConfiguration: const MapConfiguration( - scrollGesturesEnabled: false, - )); - controller.debugSetOverrides( - createMap: (_, gmaps.MapOptions options) { - capturedOptions = options; - return map; - }); - - controller.init(); - - expect(capturedOptions, isNotNull); - expect(capturedOptions!.gestureHandling, 'none', - reason: - 'disabling scroll gestures disables all gesture handling'); - }); - testWidgets('translates fortyFiveDegreeImageryEnabled option', (WidgetTester tester) async { controller = _createController( @@ -467,26 +447,6 @@ void main() { expect(capturedOptions!.gestureHandling, 'greedy'); }); - testWidgets('disables gestureHandling with zoomGesturesEnabled false', - (WidgetTester tester) async { - controller = _createController( - mapConfiguration: const MapConfiguration( - zoomGesturesEnabled: false, - )); - controller.debugSetOverrides( - createMap: (_, gmaps.MapOptions options) { - capturedOptions = options; - return map; - }); - - controller.init(); - - expect(capturedOptions, isNotNull); - expect(capturedOptions!.gestureHandling, 'none', - reason: - 'disabling scroll gestures disables all gesture handling'); - }); - testWidgets('sets initial position when passed', (WidgetTester tester) async { controller = _createController( From a047e503366fd4395519ace56075172b8175f681 Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 17 Oct 2022 16:06:58 -0400 Subject: [PATCH 15/18] Fixes --- .../google_maps_flutter/example/pubspec.yaml | 2 +- .../google_maps_flutter/google_maps_flutter/pubspec.yaml | 9 ++++++--- .../lib/src/types/map_configuration.dart | 2 +- .../google_maps_flutter_web/example/pubspec.yaml | 6 +++++- .../google_maps_flutter_web/pubspec.yaml | 7 +++++-- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index ad1ff2cad0a7..2346904d4fd7 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: # the parent directory to use the current plugin's version. path: ../ google_maps_flutter_android: ^2.1.10 - google_maps_flutter_platform_interface: ^2.2.1 + google_maps_flutter_platform_interface: ^2.0.0 dev_dependencies: espresso: ^0.1.0+2 diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 5dd0f319fcaf..852bea3c1ca5 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter description: A Flutter plugin for integrating Google Maps in iOS and Android applications. repository: https://github.com/flutter/plugins/tree/main/packages/google_maps_flutter/google_maps_flutter issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.3.0 +version: 2.2.1 environment: sdk: ">=2.14.0 <3.0.0" @@ -21,11 +21,14 @@ dependencies: sdk: flutter google_maps_flutter_android: ^2.1.10 google_maps_flutter_ios: ^2.1.10 - google_maps_flutter_platform_interface: - path: ../google_maps_flutter_platform_interface + google_maps_flutter_platform_interface: ^2.0.0 dev_dependencies: flutter_test: sdk: flutter plugin_platform_interface: ^2.0.0 stream_transform: ^2.0.0 + +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart index 5c75c4dfb2f2..1c58386fb12e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart +++ b/packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/map_configuration.dart @@ -3,7 +3,7 @@ // found in the LICENSE file. import 'package:flutter/widgets.dart'; -import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart'; +import '../../google_maps_flutter_platform_interface.dart'; /// Configuration options for the GoogleMaps user interface. @immutable diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index 7e25b6e3b483..852cbd95233e 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.2.1 + google_maps_flutter_platform_interface: ^2.0.0 google_maps_flutter_web: path: ../ @@ -26,3 +26,7 @@ dev_dependencies: integration_test: sdk: flutter mockito: ^5.3.0 + +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml index a42373a8b3e7..8f03469a9678 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/pubspec.yaml @@ -22,8 +22,7 @@ dependencies: flutter_web_plugins: sdk: flutter google_maps: ^6.1.0 - google_maps_flutter_platform_interface: - path: ../google_maps_flutter_platform_interface + google_maps_flutter_platform_interface: ^2.2.2 sanitize_html: ^2.0.0 stream_transform: ^2.0.0 @@ -34,3 +33,7 @@ dev_dependencies: # The example deliberately includes limited-use secrets. false_secrets: - /example/web/index.html + +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../google_maps_flutter_platform_interface From 46536fde2117d92bf33f2f0a9237f63e066ba901 Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 17 Oct 2022 16:12:34 -0400 Subject: [PATCH 16/18] Cleaning some things up --- .../google_maps_flutter/example/pubspec.yaml | 2 +- packages/google_maps_flutter/google_maps_flutter/pubspec.yaml | 4 ++-- .../google_maps_flutter_web/example/pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index 2346904d4fd7..ad1ff2cad0a7 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: # the parent directory to use the current plugin's version. path: ../ google_maps_flutter_android: ^2.1.10 - google_maps_flutter_platform_interface: ^2.0.0 + google_maps_flutter_platform_interface: ^2.2.1 dev_dependencies: espresso: ^0.1.0+2 diff --git a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml index 852bea3c1ca5..a09b2d4d01c3 100644 --- a/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/pubspec.yaml @@ -2,7 +2,7 @@ name: google_maps_flutter description: A Flutter plugin for integrating Google Maps in iOS and Android applications. repository: https://github.com/flutter/plugins/tree/main/packages/google_maps_flutter/google_maps_flutter issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.2.1 +version: 2.3.0 environment: sdk: ">=2.14.0 <3.0.0" @@ -21,7 +21,7 @@ dependencies: sdk: flutter google_maps_flutter_android: ^2.1.10 google_maps_flutter_ios: ^2.1.10 - google_maps_flutter_platform_interface: ^2.0.0 + google_maps_flutter_platform_interface: ^2.2.1 dev_dependencies: flutter_test: diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml index 852cbd95233e..d11ff48acd0a 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: flutter: sdk: flutter - google_maps_flutter_platform_interface: ^2.0.0 + google_maps_flutter_platform_interface: ^2.2.1 google_maps_flutter_web: path: ../ From c1b54678ab02e36d2a404d9a1573ac669b5201ab Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 17 Oct 2022 16:38:04 -0400 Subject: [PATCH 17/18] Fixed android build issue --- .../example/android/app/build.gradle | 6 +- .../example/android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 3 +- .../ios/Flutter/AppFrameworkInfo.plist | 2 +- .../google_maps_flutter/example/ios/Podfile | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 108 ++++++------------ .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../example/ios/Runner/Info.plist | 2 + .../google_maps_flutter/example/pubspec.yaml | 4 + .../google_maps_controller_test.dart | 2 +- 10 files changed, 47 insertions(+), 86 deletions(-) diff --git a/packages/google_maps_flutter/google_maps_flutter/example/android/app/build.gradle b/packages/google_maps_flutter/google_maps_flutter/example/android/app/build.gradle index f6d29f63fadc..d608fe0d16cf 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/android/app/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter/example/android/app/build.gradle @@ -27,9 +27,6 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion 31 - lintOptions { - disable 'InvalidPackage' - } defaultConfig { applicationId "io.flutter.plugins.googlemapsexample" @@ -66,6 +63,9 @@ android { api 'androidx.test:core:1.2.0' testImplementation 'com.google.android.gms:play-services-maps:17.0.0' } + lint { + disable 'InvalidPackage' + } } flutter { diff --git a/packages/google_maps_flutter/google_maps_flutter/example/android/build.gradle b/packages/google_maps_flutter/google_maps_flutter/example/android/build.gradle index 4d8d45d13a0b..3ecc2576de23 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/android/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter/example/android/build.gradle @@ -5,7 +5,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.4' + classpath 'com.android.tools.build:gradle:7.3.0' } } diff --git a/packages/google_maps_flutter/google_maps_flutter/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/google_maps_flutter/google_maps_flutter/example/android/gradle/wrapper/gradle-wrapper.properties index 9ec7236c631e..41dfb87909a8 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/google_maps_flutter/google_maps_flutter/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.1-all.zip diff --git a/packages/google_maps_flutter/google_maps_flutter/example/ios/Flutter/AppFrameworkInfo.plist b/packages/google_maps_flutter/google_maps_flutter/example/ios/Flutter/AppFrameworkInfo.plist index 3a9c234f96d4..9b41e7d87980 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/ios/Flutter/AppFrameworkInfo.plist +++ b/packages/google_maps_flutter/google_maps_flutter/example/ios/Flutter/AppFrameworkInfo.plist @@ -25,6 +25,6 @@ arm64 MinimumOSVersion - 9.0 + 11.0 diff --git a/packages/google_maps_flutter/google_maps_flutter/example/ios/Podfile b/packages/google_maps_flutter/google_maps_flutter/example/ios/Podfile index 8df8fef0a781..b690cc71379e 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/ios/Podfile +++ b/packages/google_maps_flutter/google_maps_flutter/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +# platform :ios, '11.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/packages/google_maps_flutter/google_maps_flutter/example/ios/Runner.xcodeproj/project.pbxproj b/packages/google_maps_flutter/google_maps_flutter/example/ios/Runner.xcodeproj/project.pbxproj index 343e0504134c..80586c34c9d0 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/google_maps_flutter/google_maps_flutter/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,14 +3,13 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 4510D964F3B1259FEDD3ABA6 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */; }; - 4A097997B7B27CE82FFC3AB8 /* libPods-RunnerUITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DC8ED0578E8D540BBDA17645 /* libPods-RunnerUITests.a */; }; 6851F3562835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */; }; 68E4726A2836FF0C00BDDDAC /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68E472692836FF0C00BDDDAC /* MapKit.framework */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; @@ -21,7 +20,6 @@ 982F2A6C27BADE17003C81F4 /* PartiallyMockedMapView.m in Sources */ = {isa = PBXBuildFile; fileRef = 982F2A6B27BADE17003C81F4 /* PartiallyMockedMapView.m */; }; F7151F13265D7ED70028CB91 /* GoogleMapsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F7151F12265D7ED70028CB91 /* GoogleMapsTests.m */; }; F7151F21265D7EE50028CB91 /* GoogleMapsUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F7151F20265D7EE50028CB91 /* GoogleMapsUITests.m */; }; - FC8F35FC8CD533B128950487 /* libPods-RunnerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F267F68029D1A4E2E4C572A7 /* libPods-RunnerTests.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -60,8 +58,6 @@ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 6851F3552835BC180032B7C8 /* FLTGoogleMapJSONConversionsConversionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FLTGoogleMapJSONConversionsConversionTests.m; sourceTree = ""; }; 68E472692836FF0C00BDDDAC /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/iOSSupport/System/Library/Frameworks/MapKit.framework; sourceTree = DEVELOPER_DIR; }; - 6AC1E6095B09DE4B02ECF64E /* Pods-RunnerUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerUITests/Pods-RunnerUITests.release.xcconfig"; sourceTree = ""; }; - 733AFAB37683A9DA7512F09C /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; @@ -77,11 +73,7 @@ 982F2A6A27BADE17003C81F4 /* PartiallyMockedMapView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PartiallyMockedMapView.h; sourceTree = ""; }; 982F2A6B27BADE17003C81F4 /* PartiallyMockedMapView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PartiallyMockedMapView.m; sourceTree = ""; }; B7AFC65E3DD5AC60D834D83D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - DC8ED0578E8D540BBDA17645 /* libPods-RunnerUITests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RunnerUITests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - DDDAC1342ABDF2F125577581 /* Pods-RunnerUITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerUITests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerUITests/Pods-RunnerUITests.debug.xcconfig"; sourceTree = ""; }; - E52C6A6210A56F027C582EF9 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; EA0E91726245EDC22B97E8B9 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - F267F68029D1A4E2E4C572A7 /* libPods-RunnerTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RunnerTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; F7151F10265D7ED70028CB91 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; F7151F12265D7ED70028CB91 /* GoogleMapsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GoogleMapsTests.m; sourceTree = ""; }; F7151F14265D7ED70028CB91 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -104,7 +96,6 @@ buildActionMask = 2147483647; files = ( 68E4726A2836FF0C00BDDDAC /* MapKit.framework in Frameworks */, - FC8F35FC8CD533B128950487 /* libPods-RunnerTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -112,7 +103,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4A097997B7B27CE82FFC3AB8 /* libPods-RunnerUITests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -124,8 +114,6 @@ children = ( 68E472692836FF0C00BDDDAC /* MapKit.framework */, 7755F8F4BABC3D6A0BD4048B /* libPods-Runner.a */, - F267F68029D1A4E2E4C572A7 /* libPods-RunnerTests.a */, - DC8ED0578E8D540BBDA17645 /* libPods-RunnerUITests.a */, ); name = Frameworks; sourceTree = ""; @@ -193,10 +181,6 @@ children = ( B7AFC65E3DD5AC60D834D83D /* Pods-Runner.debug.xcconfig */, EA0E91726245EDC22B97E8B9 /* Pods-Runner.release.xcconfig */, - E52C6A6210A56F027C582EF9 /* Pods-RunnerTests.debug.xcconfig */, - 733AFAB37683A9DA7512F09C /* Pods-RunnerTests.release.xcconfig */, - DDDAC1342ABDF2F125577581 /* Pods-RunnerUITests.debug.xcconfig */, - 6AC1E6095B09DE4B02ECF64E /* Pods-RunnerUITests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -251,7 +235,6 @@ isa = PBXNativeTarget; buildConfigurationList = F7151F19265D7ED70028CB91 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - D067548A17DC238B80D2BD12 /* [CP] Check Pods Manifest.lock */, F7151F0C265D7ED70028CB91 /* Sources */, F7151F0D265D7ED70028CB91 /* Frameworks */, F7151F0E265D7ED70028CB91 /* Resources */, @@ -270,7 +253,6 @@ isa = PBXNativeTarget; buildConfigurationList = F7151F25265D7EE50028CB91 /* Build configuration list for PBXNativeTarget "RunnerUITests" */; buildPhases = ( - BD39F60794E9A0264D5D3752 /* [CP] Check Pods Manifest.lock */, F7151F1A265D7EE50028CB91 /* Sources */, F7151F1B265D7EE50028CB91 /* Frameworks */, F7151F1C265D7EE50028CB91 /* Resources */, @@ -291,7 +273,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1320; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = "The Flutter Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -422,50 +404,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; - BD39F60794E9A0264D5D3752 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerUITests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - D067548A17DC238B80D2BD12 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -581,7 +519,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -632,7 +570,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -652,7 +590,10 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", @@ -674,7 +615,10 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", @@ -686,13 +630,16 @@ }; F7151F17265D7ED70028CB91 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E52C6A6210A56F027C582EF9 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; INFOPLIST_FILE = RunnerTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -702,13 +649,16 @@ }; F7151F18265D7ED70028CB91 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 733AFAB37683A9DA7512F09C /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; INFOPLIST_FILE = RunnerTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -718,11 +668,14 @@ }; F7151F26265D7EE50028CB91 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DDDAC1342ABDF2F125577581 /* Pods-RunnerUITests.debug.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = RunnerUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerUITests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -732,11 +685,14 @@ }; F7151F27265D7EE50028CB91 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6AC1E6095B09DE4B02ECF64E /* Pods-RunnerUITests.release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = RunnerUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerUITests; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/packages/google_maps_flutter/google_maps_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/google_maps_flutter/google_maps_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c983bfc640ff..a60a46be23c1 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/google_maps_flutter/google_maps_flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + diff --git a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml index ad1ff2cad0a7..287d6cd2230e 100644 --- a/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter/example/pubspec.yaml @@ -34,3 +34,7 @@ flutter: uses-material-design: true assets: - assets/ + +dependency_overrides: + google_maps_flutter_platform_interface: + path: ../../google_maps_flutter_platform_interface diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index e351110d4283..2bc194358f24 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -432,7 +432,7 @@ void main() { controller = createController( mapConfiguration: const MapConfiguration( zoomGesturesEnabled: false, - webGestureHandling: WebGestureHandling.greedy, + webGestureHandling: WebGestureHandling.greedy, )); controller.debugSetOverrides( createMap: (_, gmaps.MapOptions options) { From 4c73eea4300b08fbdd05b5aa87998e53992b555d Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 17 Oct 2022 16:45:10 -0400 Subject: [PATCH 18/18] Fixed web test --- .../example/integration_test/google_maps_controller_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart index 2bc194358f24..84db2dd05e9c 100644 --- a/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart +++ b/packages/google_maps_flutter/google_maps_flutter_web/example/integration_test/google_maps_controller_test.dart @@ -412,7 +412,7 @@ void main() { controller = createController( mapConfiguration: const MapConfiguration( scrollGesturesEnabled: false, - fortyFiveDegreeImageryEnabled: false, + fortyFiveDegreeImageryEnabled: true, )); controller.debugSetOverrides( createMap: (_, gmaps.MapOptions options) {