Skip to content
Open
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
5 changes: 5 additions & 0 deletions packages/google_maps_flutter/google_maps_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.17.1

* Updates README to link to implementation packages for platform-specific
setup information.

## 2.17.0

* Adds missing re-exports of classes related to advanced markers.
Expand Down
108 changes: 17 additions & 91 deletions packages/google_maps_flutter/google_maps_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ A Flutter plugin that provides a [Google Maps](https://developers.google.com/map
[web-support]: https://docs.flutter.dev/reference/supported-platforms

**Important:** Not all functionality is supported on all platforms.
To check details, please read the README files
For details, please read the README files
of the endorsed platform packages:

* [`google_maps_flutter_android` README](https://pub.dev/packages/google_maps_flutter_android)
* [`google_maps_flutter_ios` README](https://pub.dev/packages/google_maps_flutter_ios)
* [`google_maps_flutter_web` README](https://pub.dev/packages/google_maps_flutter_web)


## Getting Started

* Get an API key at <https://cloud.google.com/maps-platform/>.
Expand All @@ -37,95 +36,14 @@ of the endorsed platform packages:

For more details, see [Getting started with Google Maps Platform](https://developers.google.com/maps/gmp-get-started).

### Android

1. Specify your API key in the application manifest `android/app/src/main/AndroidManifest.xml`:

```xml
<manifest ...
<application ...
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="YOUR KEY HERE"/>
```

2. Read about Android-specific features and limitations in the
[`google_maps_flutter_android` README](https://pub.dev/packages/google_maps_flutter_android).

### iOS

1. Specify your API key in the application delegate `ios/Runner/AppDelegate.swift`:

```swift
import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("YOUR KEY HERE")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
```

2. Select an SDK version. The Google Maps SDK for iOS usually releases a new
major version once per year, dropping support for an older version of iOS
with each major release; see
[the SDK release notes](https://developers.google.com/maps/documentation/ios-sdk/releases)
for details of the minimum supported iOS version for each release. There is a
pub package for each SDK release.
- By default, this plugin uses [`google_maps_flutter_ios`](https://pub.dev/packages/google_maps_flutter_ios),
which will automatically select the latest SDK release that is compatible
with your project's minimum iOS version, up to version 10.x. This
functionality relies on CocoaPods, so this implementation is not compatible
with [Swift Package Manager](https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers).
Because the Google Maps SDK [will not be releasing future versions via
CocoaPods](https://developers.google.com/maps/documentation/ios-sdk/release-notes#August_18_2025)
this implementation will not support SDK releases past 10.x.
- To use a specific SDK release, add a dependency on the corresponding
package to your `pubspec.yaml` file. All of the SDK-specific packages
support Swift Package Manager. In general, you should use the latest SDK
release that is compatible with your project's minimum iOS version:
- [`google_maps_flutter_ios_sdk9`](https://pub.dev/packages/google_maps_flutter_ios_sdk9)
requires iOS 15.0 or higher.
- [`google_maps_flutter_ios_sdk10`](https://pub.dev/packages/google_maps_flutter_ios_sdk10)
requires iOS 16.0 or higher.
- Future major SDK versions will be available as new packages.

**Important:** Package authors depending on `google_maps_flutter`
**should not** depend on a specific implementation package, as that will
prevent application developers from selecting the appropriate SDK version for
their project. Instead, just depend on `google_maps_flutter` as usual, and
leave the choice of SDK version to application developers.

3. Read about iOS-specific features and limitations in the README for the
package you selected in step 2.

### Web

1. Add the following to the `<head>` section of `web/index.html`:

```html
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script>
```

2. Read about web-specific features and limitations in the
[`google_maps_flutter_web` README](https://pub.dev/packages/google_maps_flutter_web).

### All

You can now add a `GoogleMap` widget to your widget tree.

The map view can be controlled with the `GoogleMapController` that is passed to
the `GoogleMap`'s `onMapCreated` callback.

The `GoogleMap` widget should be used within a widget with a bounded size. Using it
in an unbounded widget will cause the application to throw a Flutter exception.
### Platform Setup

* **Android**: Please see [the `google_maps_flutter_android` README](https://pub.dev/packages/google_maps_flutter_android#setup).
* **iOS**: Please select an SDK version, and see the relevant README:
* [8.4 (iOS 14+)](https://pub.dev/packages/google_maps_flutter_ios#setup)
* [SDK 9.x (iOS 15+)](https://pub.dev/packages/google_maps_flutter_ios_sdk9#setup)
* [SDK 10.x (iOS 16+)](https://pub.dev/packages/google_maps_flutter_ios_sdk10#setup)
* **Web**: Please see [the `google_maps_flutter_web` README](https://pub.dev/packages/google_maps_flutter_web#setup).
Comment thread
stuartmorgan-g marked this conversation as resolved.

### Advanced Markers

Expand All @@ -151,6 +69,14 @@ Google Maps SDK you are using, consider using an asset or bitmap for customizati

### Sample Usage

To show a map, add a `GoogleMap` widget to your widget tree. The map view can
be controlled with the `GoogleMapController` that is passed to the `GoogleMap`'s
`onMapCreated` callback.

The `GoogleMap` widget should be used within a widget with a bounded size.
Using it in an unbounded widget will cause the application to throw a Flutter
exception.

<?code-excerpt "readme_sample.dart (MapSample)"?>
```dart
class MapSample extends StatefulWidget {
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.17.0
version: 2.17.1

environment:
sdk: ^3.10.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.19.10

* Updates README to include setup information.

## 2.19.9

* Adds attribution ID for Google Maps SDK usage.
Expand Down
19 changes: 15 additions & 4 deletions packages/google_maps_flutter/google_maps_flutter_android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ your app when you do, so you do not need to add it to your `pubspec.yaml`.
However, if you `import` this package to use any of its APIs directly, you
should add it to your `pubspec.yaml` as usual.

## Display Mode
## Setup

Specify your API key in the application manifest `android/app/src/main/AndroidManifest.xml`:

```xml
<manifest ...
<application ...
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="YOUR KEY HERE"/>
Comment thread
stuartmorgan-g marked this conversation as resolved.
```

### Display Mode

This plugin supports two different [platform view display modes][3]. The default
display mode is subject to change in the future, and will not be considered a
Expand All @@ -38,14 +49,14 @@ void main() {

```

### Texture Layer Hybrid Composition
#### Texture Layer Hybrid Composition

This is the current default mode and corresponds to `useAndroidViewSurface = false`.
This mode is more performant than Hybrid Composition and we recommend that you use this mode.

### Hybrid Composition
#### Hybrid Composition

This mode is available for backwards compatability and corresponds to `useAndroidViewSurface = true`.
This mode is available for backwards compatibility and corresponds to `useAndroidViewSurface = true`.
We do not recommend its use as it is less performant than Texture Layer Hybrid Composition and
certain flutter rendering effects are not supported.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_android
description: Android implementation of the google_maps_flutter plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 2.19.9
version: 2.19.10

environment:
sdk: ^3.10.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.18.3

* Updates README to include setup information.

## 2.18.2

* Adds attribution ID for Google Maps SDK usage.
Expand Down
44 changes: 43 additions & 1 deletion packages/google_maps_flutter/google_maps_flutter_ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,55 @@ your app when you do, so you do not need to add it to your `pubspec.yaml`.
However, if you `import` this package to use any of its APIs directly, you
should add it to your `pubspec.yaml` as usual.

### Alternate Implementations

This package is the default implementation only to preserve compatibility with
previous versions of the plugin. Unless you need to support iOS 14, you should
use one of the SDK-specific packages instead:

* [`google_maps_flutter_ios_sdk9`](https://pub.dev/packages/google_maps_flutter_ios_sdk9)
for iOS 15+.
* [`google_maps_flutter_ios_sdk10`](https://pub.dev/packages/google_maps_flutter_ios_sdk10)
for iOS 16+.

Using an SDK-specific package will allow you to [use Swift Package
Manager](#swift-package-manager) instead of CocoaPods, and will allow using
future major SDK releases beyond 10.x.

## Setup

Specify your API key in the application delegate `ios/Runner/AppDelegate.swift`:

```swift
import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("YOUR KEY HERE")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
```

## Swift Package Manager

This package cannot support Swift Package Manager, as Swift Package Manager
This package cannot support [Swift Package Manager][4], as Swift Package Manager
does not support automatically selecting the appropriate version of the
Google Maps SDK based on the minimum deployment target. For Swift Package
Manager compatibility, you should use the appropriate
[`google_maps_flutter_ios_sdk*` package][3] instead.

Because the Google Maps SDK [will not be releasing versions beyond 10.x via
CocoaPods](https://developers.google.com/maps/documentation/ios-sdk/release-notes#August_18_2025),
this package will not add support for newer SDKs in the future, as it had
historically done.

## Supported Heatmap Options

Expand All @@ -36,3 +77,4 @@ Manager compatibility, you should use the appropriate
[1]: https://pub.dev/packages/google_maps_flutter
[2]: https://flutter.dev/to/endorsed-federated-plugin
[3]: https://pub.dev/packages?q=implements-federated-plugin%3Agoogle_maps_flutter+platform%3Aios
[4]: https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-app-developers
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_ios
description: iOS implementation of the google_maps_flutter plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 2.18.2
version: 2.18.3

environment:
sdk: ^3.10.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.18.3

* Updates README to include setup information.

## 2.18.2

* Adds attribution ID for Google Maps SDK usage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,33 @@ implementation packages unless you have a compelling reason to do so. Instead,
just depend on `google_maps_flutter`, so that application developers can
select the appropriate SDK version for their minimum iOS version target.

## Minimum iOS Version

Google Maps SDK 10.x requires iOS 16, so if your application does not already
require iOS 16 you must update your minimum iOS deployment version.

Alternatively, you could use a [different SDK version][4]
with a lower iOS version requirement.
## Setup

1. Specify your API key in the application delegate `ios/Runner/AppDelegate.swift`:

```swift
import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("YOUR KEY HERE")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
```

2. Google Maps SDK 10.x requires iOS 16, so if your application does not already
require iOS 16 you must update your minimum iOS deployment version.

Alternatively, you could use a [different SDK version][4]
with a lower iOS version requirement.

## Supported Heatmap Options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_ios_sdk10
description: iOS implementation of the google_maps_flutter plugin using Google Maps SDK 10.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios_sdk10
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 2.18.2
version: 2.18.3

environment:
sdk: ^3.10.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.18.3

* Updates README to include setup information.

## 2.18.2

* Adds attribution ID for Google Maps SDK usage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,33 @@ implementation packages unless you have a compelling reason to do so. Instead,
just depend on `google_maps_flutter`, so that application developers can
select the appropriate SDK version for their minimum iOS version target.

## Minimum iOS Version

Google Maps SDK 9.x requires iOS 15, so if your application does not already
require iOS 15 you must update your minimum iOS deployment version.

Alternatively, you could use [`google_maps_flutter_ios`][4] to support
iOS 14.
## Setup

1. Specify your API key in the application delegate `ios/Runner/AppDelegate.swift`:

```swift
import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GMSServices.provideAPIKey("YOUR KEY HERE")
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
```

2. Google Maps SDK 9.x requires iOS 15, so if your application does not already
require iOS 15 you must update your minimum iOS deployment version.

Alternatively, you could use [`google_maps_flutter_ios`][4] to support
iOS 14.

## Supported Heatmap Options

Expand Down
Loading
Loading