Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1df0ccc
Transfer changes from flutter/plugins
Rexios80 Feb 22, 2023
6b10886
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Mar 3, 2023
302fb6e
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Mar 7, 2023
aeeb30c
Regenerated overrides with tooling
Rexios80 Mar 7, 2023
5a02d16
Revert android example config changes
Rexios80 Mar 7, 2023
38a2060
Alphabetical ordering
Rexios80 Mar 7, 2023
6e04109
Revert changes in unrelated platforms
Rexios80 Mar 7, 2023
dd16d53
Merge branch 'main' into google-maps-more-web-config-options
Rexios80 Apr 24, 2023
69d678f
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Apr 24, 2023
64342e7
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Jun 28, 2023
275ec3f
Fix analysis issue
Rexios80 Jun 28, 2023
e09c618
Update packages/google_maps_flutter/google_maps_flutter_web/lib/src/c…
Rexios80 Jul 14, 2023
b759f98
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Jul 14, 2023
b31f3dd
Merge remote-tracking branch 'origin/google-maps-more-web-config-opti…
Rexios80 Jul 14, 2023
03903ef
Remove duplicated changelog line
Rexios80 Jul 14, 2023
cc80903
Platform interface changes for #3258
Rexios80 Jul 15, 2023
f59558c
Merge branch 'main' into google-maps-more-web-config-options-platform…
Rexios80 Jul 15, 2023
44640ae
Adds tests
Rexios80 Jul 15, 2023
2ccf1fa
Fixes
Rexios80 Jul 15, 2023
c144efe
Adding more tests
Rexios80 Jul 15, 2023
493210d
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Jul 17, 2023
43f8b84
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Jul 17, 2023
9c9cc16
Update versions
Rexios80 Jul 17, 2023
a2c2566
Merge branch 'google-maps-more-web-config-options-platform-interface'…
Rexios80 Jul 18, 2023
0a381c9
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Jul 18, 2023
6be90e8
Merge remote-tracking branch 'origin/google-maps-more-web-config-opti…
Rexios80 Jul 18, 2023
ff28a18
Remove dependency overrides for platform interface
Rexios80 Jul 18, 2023
ced5c25
Fixing changelogs
Rexios80 Jul 18, 2023
5ec7bd2
Fixing issues
Rexios80 Jul 18, 2023
da96ec1
Merge branch 'main' into google-maps-more-web-config-options
Rexios80 Jul 18, 2023
222b80d
Update google_maps_platform_interface constraint
Rexios80 Jul 18, 2023
e2e5623
Merge remote-tracking branch 'origin/google-maps-more-web-config-opti…
Rexios80 Jul 18, 2023
bed7229
Revert "Update google_maps_platform_interface constraint"
Rexios80 Jul 18, 2023
50ee59d
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Jul 18, 2023
133810f
Let's try this again
Rexios80 Jul 18, 2023
b2da449
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Jul 19, 2023
582a1fd
Merge remote-tracking branch 'upstream/main' into google-maps-more-we…
Rexios80 Jul 21, 2023
e64a239
Update google_maps_flutter_web
Rexios80 Jul 21, 2023
a7aeb65
Fixes
Rexios80 Jul 21, 2023
caa5e49
Merge branch 'main' into google-maps-more-web-config-options
Rexios80 Jul 21, 2023
ab9ff93
Merge branch 'main' into google-maps-more-web-config-options
Rexios80 Jul 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.0

* Adds options for gesture handling and tilt controls on web.

## 2.2.5

* Updates iOS minimum version in README.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion flutter.compileSdkVersion

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
applicationId "io.flutter.plugins.googlemapsexample"
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.1'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ flutter:
uses-material-design: true
assets:
- assets/

dependency_overrides:
google_maps_flutter_platform_interface:
path: ../../google_maps_flutter_platform_interface
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export 'package:google_maps_flutter_platform_interface/google_maps_flutter_platf
Cap,
Circle,
CircleId,
WebGestureHandling,
InfoWindow,
JointType,
LatLng,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class GoogleMap extends StatefulWidget {
required this.initialCameraPosition,
this.onMapCreated,
this.gestureRecognizers = const <Factory<OneSequenceGestureRecognizer>>{},
this.webGestureHandling,
this.compassEnabled = true,
this.mapToolbarEnabled = true,
this.cameraTargetBounds = CameraTargetBounds.unbounded,
Expand All @@ -104,6 +105,7 @@ class GoogleMap extends StatefulWidget {
this.zoomGesturesEnabled = true,
this.liteModeEnabled = false,
this.tiltGesturesEnabled = true,
this.fortyFiveDegreeImageryEnabled = false,
this.myLocationEnabled = false,
this.myLocationButtonEnabled = true,
this.layoutDirection,
Expand Down Expand Up @@ -180,6 +182,9 @@ class GoogleMap extends StatefulWidget {
/// True if the map view should respond to tilt gestures.
final bool tiltGesturesEnabled;

/// 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;

Expand Down Expand Up @@ -283,6 +288,11 @@ class GoogleMap extends StatefulWidget {
/// were not claimed by any other gesture recognizer.
final Set<Factory<OneSequenceGestureRecognizer>> gestureRecognizers;

/// This setting controls how the API handles gestures on the map. Web only.
///
/// See [WebGestureHandling] for more details.
final WebGestureHandling? webGestureHandling;

/// Creates a [State] for this [GoogleMap].
@override
State createState() => _GoogleMapState();
Expand Down Expand Up @@ -535,6 +545,7 @@ class _GoogleMapState extends State<GoogleMap> {
MapConfiguration _configurationFromMapWidget(GoogleMap map) {
assert(!map.liteModeEnabled || Platform.isAndroid);
return MapConfiguration(
webGestureHandling: map.webGestureHandling,
compassEnabled: map.compassEnabled,
mapToolbarEnabled: map.mapToolbarEnabled,
cameraTargetBounds: map.cameraTargetBounds,
Expand All @@ -543,6 +554,7 @@ MapConfiguration _configurationFromMapWidget(GoogleMap map) {
rotateGesturesEnabled: map.rotateGesturesEnabled,
scrollGesturesEnabled: map.scrollGesturesEnabled,
tiltGesturesEnabled: map.tiltGesturesEnabled,
fortyFiveDegreeImageryEnabled: map.fortyFiveDegreeImageryEnabled,
trackCameraPosition: map.onCameraMove != null,
zoomControlsEnabled: map.zoomControlsEnabled,
zoomGesturesEnabled: map.zoomGesturesEnabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/packages/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.5
version: 2.3.0

environment:
sdk: ">=2.14.0 <3.0.0"
Expand All @@ -28,3 +28,7 @@ dev_dependencies:
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.0

* Adds options for gesture handling and tilt controls on web.

## 2.2.6

* Updates links for the merge of flutter/plugins into flutter/packages.
Expand Down Expand Up @@ -48,7 +52,7 @@

## 2.1.5

Removes dependency on `meta`.
* Removes dependency on `meta`.

## 2.1.4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// found in the LICENSE file.

import 'package:flutter/widgets.dart';

import 'ui.dart';
import '../../google_maps_flutter_platform_interface.dart';

/// Configuration options for the GoogleMaps user interface.
@immutable
Expand All @@ -15,6 +14,7 @@ class MapConfiguration {
/// as either a full configuration selection, or an update to an existing
/// configuration where only non-null values are updated.
const MapConfiguration({
this.webGestureHandling,
this.compassEnabled,
this.mapToolbarEnabled,
this.cameraTargetBounds,
Expand All @@ -23,6 +23,7 @@ class MapConfiguration {
this.rotateGesturesEnabled,
this.scrollGesturesEnabled,
this.tiltGesturesEnabled,
this.fortyFiveDegreeImageryEnabled,
this.trackCameraPosition,
this.zoomControlsEnabled,
this.zoomGesturesEnabled,
Expand All @@ -35,6 +36,11 @@ class MapConfiguration {
this.buildingsEnabled,
});

/// This setting controls how the API handles gestures on the map. Web only.
///
/// See [WebGestureHandling] for more details.
final WebGestureHandling? webGestureHandling;

/// True if the compass UI should be shown.
final bool? compassEnabled;

Expand All @@ -47,25 +53,32 @@ class MapConfiguration {
/// The type of the map.
final MapType? mapType;

/// The prefered zoom range.
/// The preferred zoom range.
final MinMaxZoomPreference? minMaxZoomPreference;

/// True if rotate gestures should be enabled.
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.
final bool? tiltGesturesEnabled;

/// True if 45 degree imagery should be enabled. Web only.
final bool? fortyFiveDegreeImageryEnabled;

/// True if camera position changes should trigger notifications.
final bool? trackCameraPosition;

/// True if zoom controls should be displayed.
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
Expand Down Expand Up @@ -94,6 +107,9 @@ class MapConfiguration {
/// that are different from [other].
MapConfiguration diffFrom(MapConfiguration other) {
return MapConfiguration(
webGestureHandling: webGestureHandling != other.webGestureHandling
? webGestureHandling
: null,
compassEnabled:
compassEnabled != other.compassEnabled ? compassEnabled : null,
mapToolbarEnabled: mapToolbarEnabled != other.mapToolbarEnabled
Expand All @@ -117,6 +133,10 @@ class MapConfiguration {
tiltGesturesEnabled: tiltGesturesEnabled != other.tiltGesturesEnabled
? tiltGesturesEnabled
: null,
fortyFiveDegreeImageryEnabled:
fortyFiveDegreeImageryEnabled != other.fortyFiveDegreeImageryEnabled
? fortyFiveDegreeImageryEnabled
: null,
trackCameraPosition: trackCameraPosition != other.trackCameraPosition
? trackCameraPosition
: null,
Expand Down Expand Up @@ -150,6 +170,7 @@ class MapConfiguration {
/// replacing the previous values.
MapConfiguration applyDiff(MapConfiguration diff) {
return MapConfiguration(
webGestureHandling: diff.webGestureHandling ?? webGestureHandling,
compassEnabled: diff.compassEnabled ?? compassEnabled,
mapToolbarEnabled: diff.mapToolbarEnabled ?? mapToolbarEnabled,
cameraTargetBounds: diff.cameraTargetBounds ?? cameraTargetBounds,
Expand All @@ -160,6 +181,8 @@ class MapConfiguration {
scrollGesturesEnabled:
diff.scrollGesturesEnabled ?? scrollGesturesEnabled,
tiltGesturesEnabled: diff.tiltGesturesEnabled ?? tiltGesturesEnabled,
fortyFiveDegreeImageryEnabled:
diff.fortyFiveDegreeImageryEnabled ?? fortyFiveDegreeImageryEnabled,
trackCameraPosition: diff.trackCameraPosition ?? trackCameraPosition,
zoomControlsEnabled: diff.zoomControlsEnabled ?? zoomControlsEnabled,
zoomGesturesEnabled: diff.zoomGesturesEnabled ?? zoomGesturesEnabled,
Expand All @@ -176,6 +199,7 @@ class MapConfiguration {

/// True if no options are set.
bool get isEmpty =>
webGestureHandling == null &&
compassEnabled == null &&
mapToolbarEnabled == null &&
cameraTargetBounds == null &&
Expand All @@ -184,6 +208,7 @@ class MapConfiguration {
rotateGesturesEnabled == null &&
scrollGesturesEnabled == null &&
tiltGesturesEnabled == null &&
fortyFiveDegreeImageryEnabled == null &&
trackCameraPosition == null &&
zoomControlsEnabled == null &&
zoomGesturesEnabled == null &&
Expand All @@ -204,6 +229,7 @@ class MapConfiguration {
return false;
}
return other is MapConfiguration &&
webGestureHandling == other.webGestureHandling &&
compassEnabled == other.compassEnabled &&
mapToolbarEnabled == other.mapToolbarEnabled &&
cameraTargetBounds == other.cameraTargetBounds &&
Expand All @@ -212,6 +238,7 @@ class MapConfiguration {
rotateGesturesEnabled == other.rotateGesturesEnabled &&
scrollGesturesEnabled == other.scrollGesturesEnabled &&
tiltGesturesEnabled == other.tiltGesturesEnabled &&
fortyFiveDegreeImageryEnabled == other.fortyFiveDegreeImageryEnabled &&
trackCameraPosition == other.trackCameraPosition &&
zoomControlsEnabled == other.zoomControlsEnabled &&
zoomGesturesEnabled == other.zoomGesturesEnabled &&
Expand All @@ -226,6 +253,7 @@ class MapConfiguration {

@override
int get hashCode => Object.hash(
webGestureHandling,
compassEnabled,
mapToolbarEnabled,
cameraTargetBounds,
Expand All @@ -234,6 +262,7 @@ class MapConfiguration {
rotateGesturesEnabled,
scrollGesturesEnabled,
tiltGesturesEnabled,
fortyFiveDegreeImageryEnabled,
trackCameraPosition,
zoomControlsEnabled,
zoomGesturesEnabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ export 'utils/marker.dart';
export 'utils/polygon.dart';
export 'utils/polyline.dart';
export 'utils/tile_overlay.dart';
export 'web_gesture_handling.dart';
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 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
/// 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,
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/google_maps_f
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.2.6
version: 2.3.0

environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.1

* Adds options for gesture handling and tilt controls.

## 0.4.0+6

* Updates links for the merge of flutter/plugins into flutter/packages.
Expand Down
Loading