搜索插件、代码仓与 APP 分类

GitHub 代码仓Unact/yandex_mapkit

yandex_mapkit

YandexMapkit 的 Flutter 实现

yandex_mapkit 项目封面
星标
137
复刻
180
最近推送(UTC)
2026年7月21日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

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
  1. Go to https://developer.tech.yandex.ru/services/
  2. 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
dependencies {
    implementation 'com.yandex.android:maps.mobile:4.39.1-<YOUR_DESIRED_VARIANT>'
}
  • 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

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <application
      android:name=".MainApplication" >
Usage

For usage examples refer to example app

image

Additional remarks
Language

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.

AndroidYandexMap.useAndroidViewSurface = false;
Unact GitHub avatar
GitHub 作者

Unact ↗

语言DartJavaSwiftRubyObjective-C

分类

此仓库发布的插件

使用的依赖

依赖清单 5 项

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗