# Google Map

Google map was use to allow Customer/user picker different location on map for their delivery address.

For this to work, you would need to obtain a google map key api from google console. Here is a link to google console where you can get api key <https://cloud.google.com/maps-platform/>.

And don't forget to enable the following APIs in <https://console.cloud.google.com/google/maps-apis/>

* Maps SDK for Android
* Maps SDK for iOS
* Places API
* Geolocation API
* Geocoding API
* **Directions API**
* **Distance Matrix API (v1.3.2+)**
* And ensure to enable billing for the project.

### App Setup

Please follow the instructions below to add google map api key to the flutter project

#### Android  <a href="#android" id="android"></a>

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

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

#### iOS <a href="#ios" id="ios"></a>

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: [UIApplicationLaunchOptionsKey: Any]?
  ) -> Bool {
    GMSServices.provideAPIKey("YOUR KEY HERE")
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}
```
