

Then, write the import GoogleMaps statement at the top to avoid iOS build issues.Flutter Cluster Manager for Google Maps #Ī Flutter package to cluster items on a Google Maps widget based on Geohash. The steps for running Google Maps in a Flutter app for iOS devices are similar to the procedure for Android.įirst, specify your API key in the application delegate ios/Runner/AppDelegate.swift Now the AndroidManifest.xml file should look like this: Replace the value "YOUR KEY HERE" with an API key you created. To be able to use the Google Maps inside the app via the API key you created in the previous section, you’ll have to copy and paste as per the instructions below.įirst, open your Flutter project and navigate to the file at this location: android/app/src/main/AndroidManifest.xml. If it were just for the map, you’d select Maps API from the listĪdding Google Maps in Flutter app (Android)

You can select the appropriate option to make sure the key you created works only for that specific platform
#Google maps flutter android

For example, if you’re willing to use the API keys just for a map, then you should allow it to be used by the Maps service only. If you’re targeting both platforms, you should obtain two API keys so that you can track them better.Īfter creating the API keys, I would highly recommend implementing some restrictions.
#Google maps flutter for android
Click Maps SDK for Android and then click Enable.Click Maps SDK for iOS and then click Enable.Once the project is created, you’ll have to enable the Maps API SDK for both Android and iOS. Head to the Google Developers Console and click the already-selected project.Ĭlick on the current project name again and you should see your new project created in the list. This is required because you’ll need APIs to integrate Google Maps in your app. The very first step is to create a project at Google Developers Console. Modifying your maps with the GoogleMap widgetĬreating a project in Google Cloud Platform.Adding Google Maps in Flutter (Android).

Creating a project in Google Cloud Platform.
#Google maps flutter how to
In this tutorial, we’ll show you how to use the official plugin for integrating Google Maps in your Flutter app. We use it for everything from finding directions to a destination, to searching for a nearby restaurant or gas station, to just zooming in and out of the map to see the street view of any location on the planet.Īdding Google Maps to your mobile app can open up a whole new world to your users - literally. I can’t imagine what life would be like without Google Maps. Using Google Maps to add maps in Flutter applicationsĮditor’s note: This post was updated on 23 September 2022. Over the last seven-plus years, I've been developing and leading various mobile apps in different areas. Pinkesh Darji Follow I love to solve problems using technology that improves users' lives on a major scale.
