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) API restrictions enable you to select which services are accessible using this key.You can select the appropriate option to make sure the key you created works only for that specific platform Application restrictions enable you to define which type of app should have access to this key (i.e., Android or iOS).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. Click on the Credentials menu on the left.Therefore, you must create a set of API keys for it and restrict its permissions to reduce the chances of unauthorized usage. It is important to note that the access to the Google Map APIs is not free. 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.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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |