iNavi Global Map Flutter Plugin
A Flutter plugin for the iNavi Global Map SDK, providing native map display and interaction on Android and iOS through a single Dart API.
SDK App Key Required — An iNavi-issued app key must be configured on both platforms before the SDK can authenticate. visit the Maps Platform to request a key.
Features
- Native map rendering via
InaviGlobalMapView(AndroidPlatformView/ iOSUiKitView) - SDK authentication with an event-driven result stream (
InaviGlobalMapSdk.instance.onAuth) - Camera control: animate and move to arbitrary positions and zoom levels
- Marker placement with tap callbacks
- Unified Dart API backed by Android (Kotlin) and iOS (Swift) implementations
Requirements
| Platform | Minimum version |
|---|---|
| Android | API 23 (Android 6.0) |
| iOS | 15.0 |
| Flutter | 3.x |
Installation
Add inavi_global_map_flutter to your pubspec.yaml:
dependencies:
inavi_global_map_flutter: ^1.0.0
Then run:
flutter pub get
Platform Setup
Android
1. Set the SDK app key
Inside the <application> element of android/app/src/main/AndroidManifest.xml:
<application ...>
<!-- ... -->
<meta-data
android:name="com.inavi.global.mapsdk.Appkey"
android:value="YOUR_APP_KEY" />
</application>
Replace YOUR_APP_KEY with your iNavi-issued app key.
iOS
1. Set the SDK app key
Add your app key to ios/Runner/Info.plist:
<key>INaviAppKey</key>
<string>YOUR_APP_KEY</string>
Replace YOUR_APP_KEY with your iNavi app key.
2. Add the iNavi spec repository
Global-iNavi-Maps-SDK is hosted on a private iNavi CocoaPods spec repository.
Add the source to your ios/Podfile before the target block:
source 'https://cdn.cocoapods.org/'
source 'https://bitbucket.org/mobility-tech/inavi-cocoapods-specs.git'
3. Install CocoaPods dependencies
From the host app's ios/ directory, run:
cd ios
pod install --repo-update
Usage
1. Import the package
import 'package:inavi_global_map_flutter/inavi_global_map_flutter.dart';
2. Handle authentication events
Authentication is triggered automatically when InaviGlobalMapView is first rendered.
Subscribe to onAuth at the root widget before the map view appears:
class _MyAppState extends State<MyApp> {
StreamSubscription<SdkAuthEvent>? _authSub;
@override
void initState() {
super.initState();
_authSub = InaviGlobalMapSdk.instance.onAuth.listen((event) {
switch (event) {
case SdkAuthSuccess():
// SDK is ready — safe to call map APIs.
break;
case SdkAuthFailure(:final errorCode, :final errorMessage):
debugPrint('Auth failed — code: $errorCode, message: $errorMessage');
}
});
}
@override
void dispose() {
_authSub?.cancel();
super.dispose();
}
}
3. Display the map
InaviGlobalMapView(
initialCameraPosition: const CameraPosition(
target: Coordinate(wgsLat: 37.5666, wgsLon: 126.9784),
zoom: 14,
),
onMapCreated: (InaviGlobalMapController controller) {
// Map view is ready; use controller for camera and map operations.
},
)
4. Control the camera
controller.animateCamera(
CameraUpdate.newLatLngZoom(
const Coordinate(wgsLat: 37.5666, wgsLon: 126.9784),
16,
),
);
5. Add markers
InaviGlobalMapView(
initialCameraPosition: ...,
markers: {
Marker(
markerId: const MarkerId('marker_1'),
position: const Coordinate(wgsLat: 37.5666, wgsLon: 126.9784),
onTap: () => debugPrint('marker tapped'),
),
},
)
Use only APIs documented by the official iNavi Global Map SDK guide. Undocumented or internal symbols may change without notice and are not supported.
Example App
A complete integration example is available in the example/ directory, covering
app key configuration, SDK authentication, map display, camera control, and marker
placement.
cd example
flutter pub get
flutter run
License
See LICENSE for details.