Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@
## 0.6.3

* Adds support for mapTypeControlEnabled, fullscreenControlEnabled, and streetViewControlEnabled.

## 0.6.2+3

* Updates README to include setup information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:
dependencies:
flutter:
sdk: flutter
google_maps_flutter_platform_interface: ^2.14.0
google_maps_flutter_platform_interface: ^2.16.0
google_maps_flutter_web:
path: ../..
web: ^1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,60 @@ void main() {
expect(capturedOptions!.cameraControl, isTrue);
});

testWidgets('translates mapTypeControlEnabled option', (WidgetTester tester) async {
gmaps.MapOptions? capturedOptions;
controller = createController(
mapConfiguration: const MapConfiguration(mapTypeControlEnabled: true),
);
controller.debugSetOverrides(
createMap: (_, gmaps.MapOptions options) {
capturedOptions = options;
return map;
},
);

controller.init();

expect(capturedOptions, isNotNull);
expect(capturedOptions!.mapTypeControl, isTrue);
});

testWidgets('translates fullscreenControlEnabled option', (WidgetTester tester) async {
gmaps.MapOptions? capturedOptions;
controller = createController(
mapConfiguration: const MapConfiguration(fullscreenControlEnabled: true),
);
controller.debugSetOverrides(
createMap: (_, gmaps.MapOptions options) {
capturedOptions = options;
return map;
},
);

controller.init();

expect(capturedOptions, isNotNull);
expect(capturedOptions!.fullscreenControl, isTrue);
});

testWidgets('translates streetViewControlEnabled option', (WidgetTester tester) async {
gmaps.MapOptions? capturedOptions;
controller = createController(
mapConfiguration: const MapConfiguration(streetViewControlEnabled: true),
);
controller.debugSetOverrides(
createMap: (_, gmaps.MapOptions options) {
capturedOptions = options;
return map;
},
);

controller.init();

expect(capturedOptions, isNotNull);
expect(capturedOptions!.streetViewControl, isTrue);
});

testWidgets('translates webCameraControlPosition option', (WidgetTester tester) async {
gmaps.MapOptions? capturedOptions;
controller = createController(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:
dependencies:
flutter:
sdk: flutter
google_maps_flutter_platform_interface: ^2.14.0
google_maps_flutter_platform_interface: ^2.16.0
google_maps_flutter_web:
path: ../..
web: ^1.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,10 @@ gmaps.MapOptions _configurationAndStyleToGmapsOptions(
options.rotateControl = configuration.fortyFiveDegreeImageryEnabled;
}

// These don't have any configuration entries, but they seem to be off in the
// native maps.
options.mapTypeControl = false;
options.fullscreenControl = false;
options.streetViewControl = false;
// These are off by default in the native maps.
options.mapTypeControl = configuration.mapTypeControlEnabled ?? false;
options.fullscreenControl = configuration.fullscreenControlEnabled ?? false;
options.streetViewControl = configuration.streetViewControlEnabled ?? false;

// Treat an empty mapId as null, as the app-facing package may pass it either
// way.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_web
description: Web platform implementation of google_maps_flutter
repository: https://github.com/flutter/packages/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.6.2+3
version: 0.6.3

environment:
sdk: ^3.10.0
Expand All @@ -23,7 +23,7 @@ dependencies:
flutter_web_plugins:
sdk: flutter
google_maps: ^8.1.0
google_maps_flutter_platform_interface: ^2.15.0
google_maps_flutter_platform_interface: ^2.16.0
sanitize_html: ^2.0.0
stream_transform: ^2.0.0
web: ^1.0.0
Expand Down
Loading