A flutter plugin for integrating Map4D Services in iOS and Android applications.
- Android SDK 21+
- iOS 12.0+
To use this plugin, add map4d_services
as a dependency in your pubspec.yaml
file.
dependencies:
map4d_services: ^1.2.1
Or run command
flutter pub add map4d_services
The Services API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes. You must have at least one API key associated with your project.
Get an API key at https://map.map4d.vn/user/
Provide services api key from android/app/src/main/AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<meta-data
android:name="vn.map4d.services.ACCESS_KEY"
android:value="YOUR_SERVICES_ACCESS_KEY"/>
</application>
</manifest>
Provide services api key from ios/Runner/Info.plist
<key>Map4dServicesAccessKey</key>
<string>YOUR_SERVICES_ACCESS_KEY</string>
import 'package:flutter/material.dart';
import 'package:map4d_services/map4d_services.dart';
void getPlaceDetail() async {
MFServices.places
.fetchPlaceDetail('5c88df71d2c05acd14848f9e')
.then((detail) => {print('Place Detail: $detail')})
.onError<MFServiceError>((error, stackTrace) =>
{print('Place Detail Error: ${error.code}, ${error.message}')});
}
See example directory for more examples
- Guides: https://docs.map4d.vn/map4d-service/flutter/
- API Reference: https://pub.dev/documentation/map4d_services/latest/