Yandex MapKit는 Android 및 iOS 애플리케이션에 Yandex 지도를 원활하게 통합할 수 있는 Flutter 플러그인입니다. 일관된 Dart API를 통해 지도 렌더링, 마커, 경로, 지오코딩 기능에 접근할 수 있습니다. 이 플러그인은 두 플랫폼 모두에서 네이티브 성능을 지원하며 커뮤니티가 유지 관리합니다. 개발자는 지도 외관을 사용자 정의하고 사용자 상호작용을 처리하며 Yandex의 지도 데이터를 활용하여 위치 기반 서비스를 제공할 수 있습니다. Yandex 지도가 널리 사용되는 지역에서 세부적인 지도와 내비게이션 도구가 필요한 앱에 이상적입니다.
사용 사례
모바일 앱에 Yandex 지도 통합
사용자 정의 마커 및 오버레이 표시
경로 계획 및 내비게이션 구현
주소를 좌표로 변환하기
위치 인식 애플리케이션 개발
주요 기능
크로스 플랫폼 지원 (Android 및 iOS)
네이티브 지도 렌더링 성능
마커 및 폴리라인 사용자 정의
지오코딩 및 역지오코딩
인터랙티브 지도 제스처 및 이벤트
적합한 대상
러시아 및 CIS 시장 대상 앱
Yandex 지도 데이터를 사용하는 개발자
위치 기반 서비스 애플리케이션
내비게이션 및 라우팅 기능
고려 사항
Yandex MapKit SDK 설정이 필요합니다
다른 플러그인과 비교해 문서가 제한적입니다
야н데크스의 지역 커버리지에 따라 달라짐
올바른 API 키 구성이 필요합니다
Android에서 추가 권한이 필요할 수 있습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
yandex_mapkit
A flutter plugin for displaying yandex maps on iOS and Android.
Android
iOS
Support
SDK 26+
iOS 15+
Disclaimer: This project uses Yandex Mapkit which belongs to Yandex
When using Mapkit refer to these terms of use
Features
[X] Working with Placemarks/Polylines/Polygons/Circles - adding, updating, removing, tap events, styling
[X] Working with collections of map objects and clusters
[X] Setting map bounds and limiting user interactions
[X] Showing current user location
[X] Address suggestions
[X] Basic driving/bicycle/pedestrian routing
[X] Basic address direct/reverse search
[X] Working with geo objects
[X] Support for both lite and full variants
Getting Started
Generate your API Key
Go to https://developer.tech.yandex.ru/services/
Create a MapKit Mobile SDK key
Setup for iOS
Specify your API key and locale in ios/Runner/AppDelegate.swift. It should be similar to the following
import UIKit
import Flutter
import YandexMapsMobile
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
YMKMapKit.setLocale("YOUR_LOCALE") // Your preferred language. Not required, defaults to system language
YMKMapKit.setApiKey("YOUR_API_KEY") // Your generated API key
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
Specify your desired variant of native library using environment variable YANDEX_MAPKIT_VARIANT
Available options: lite and full. navikit variant is currently not supported.
Defaults to lite.
After changing YANDEX_MAPKIT_VARIANT you need to invalidate Xcode cache using
rm -rf ~/Library/Developer/Xcode/DerivedData
Setup for Android
Specify your desired variant of native library.
Available options: lite and full. navikit variant is currently not supported.
Defaults to lite.
Add the following line to android/gradle.properties
yandexMapkit.variant=<YOUR_DESIRED_VARIANT>
Add dependency implementation 'com.yandex.android:maps.mobile:4.39.1-<YOUR_DESIRED_VARIANT>' to android/app/build.gradle
Specify your API key and locale in your custom application class.
If you don't have one the you can create it like so
android/app/src/main/.../MainApplication.java
import android.app.Application;
import com.yandex.mapkit.MapKitFactory;
public class MainApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
MapKitFactory.setLocale("YOUR_LOCALE"); // Your preferred language. Not required, defaults to system language
MapKitFactory.setApiKey("YOUR_API_KEY"); // Your generated API key
}
}
android/app/src/main/.../MainApplication.kt
import android.app.Application
import com.yandex.mapkit.MapKitFactory
class MainApplication: Application() {
override fun onCreate() {
super.onCreate()
MapKitFactory.setLocale("YOUR_LOCALE") // Your preferred language. Not required, defaults to system language
MapKitFactory.setApiKey("YOUR_API_KEY") // Your generated API key
}
}
In your android/app/src/main/AndroidManifest.xml
Add permissions <uses-permission android:name="android.permission.INTERNET"/> and <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Find application tag and replace android:name to the name of your custom application class prefixed by a dot ..
In the end it should look like the following
YandexMapkit always works with one language only.
Due to native constraints after the application is launched it can't be changed.
Android. Hybrid Composition
By default android views are rendered using Hybrid Composition.
To render the YandexMap widget on Android using Virtual Display(old composition), set AndroidYandexMap.useAndroidViewSurface to false.
Place this anywhere in your code, before using YandexMap widget.