This flutter project uses Atlas to handle different map providers in the same application.
git clone https://github.com/edsondiasalves/multi_map_atlas.git
cd multi_map_atlas
flutter pub get
Since the heresdk ios framework file uses git lfs to be hosted in github, you need to download it manually to the flutter dependency directory:
/Users/[YOUR-USER]/.pub-cache/git/here_sdk-[REFERENCE]/ios/Frameworks/heresdk.framework/
For getting your Google API Key sign up to the Google Cloud
For getting you MapBox API Key sign up to the Mapbox
For getting you Here API Key and Secret sign up to the Here Developer Portal
In the
ios/Runner/Info.plistfile change the highlighted value
- Here Maps
<key>HERECredentials</key>
<dict>
<key>AccessKeyId</key>
<string>[PUT YOUR KEY HERE]</string>
<key>AccessKeySecret</key>
<string>[PUT YOUR SECRET HERE]</string>
</dict>
- Mapbox
<key>MGLMapboxAccessToken</key>
<string>[PUT YOUR TOKEN HERE]</string>
- Google Maps
In the
ios/Runner/AppDelegate.swiftfile change the highlighted value
GMSServices.provideAPIKey("[PUT YOUR API KEY HERE]")
In the
app/src/main/AndroidManifest.xmlfile change the API Key
- Here Maps
<application
android:name="io.flutter.app.FlutterApplication"
android:label="here_maps_atlas"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.here.sdk.access_key_id" android:value="[PUT YOUR KEY KERE]"/>
<meta-data android:name="com.here.sdk.access_key_secret" android:value="[PUT YOUR SECRET HERE]"/>
- MapBox
<application
android:name="io.flutter.app.FlutterApplication"
android:label="mapbox_atlas"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.mapbox.token"
android:value="[PUT YOUR TOKEN HERE]" />
- Google Maps
<application
android:name="io.flutter.app.FlutterApplication"
android:label="google_maps_atlas"
android:icon="@mipmap/ic_launcher">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="[PUT YOUR API KEY HERE]"/>
flutter run lib/src/main.dart