पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

yandex_mapkit कवर
पैकेज विवरणv4.3.0

yandex_mapkit

Android और iOS एप्लिकेशन में Yandex.MapKit को एकीकृत करने के लिए एक Flutter प्लगइन।

AndroidiOS
30-दिन डाउनलोड
7.8 हज़ार
लाइक
236
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add yandex_mapkit

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

Yandex MapKit एक Flutter प्लगइन है जो Android और iOS एप्लिकेशन में Yandex मानचित्र के बिना कठिनाई से एकीकरण की अनुमति देता है। यह एक संगत Dart API के माध्यम से मानचित्र रेंडरिंग, मार्कर, मार्ग और भौगोलिक कोडिंग विशेषताओं तक पहुँच प्रदान करता है। प्लगइन दोनों प्लेटफॉर्मों के लिए मूल प्रदर्शन के साथ समर्थन करता है और समुदाय द्वारा बनाए रखा जाता है। डेवलपर्स मानचित्र के दिखावट को कस्टमाइज़ कर सकते हैं, उपयोगकर्ता इंटरैक्शन को संभाल सकते हैं, और स्थान-आधारित सेवाओं के लिए Yandex के मानचित्र डेटा का उपयोग कर सकते हैं। ऐसे एप्लिकेशन के लिए यह आदर्श है जिनमें विस्तृत मानचित्र और नेविगेशन टूल की आवश्यकता होती है जहां Yandex मानचित्र व्यापक रूप से उपयोग किए जाते हैं।

उपयोग

  • मोबाइल ऐप्स में Yandex मैप्स का एकीकरण
  • कस्टम मार्कर और ओवरले दिखाएं
  • मार्ग योजना और नेविगेशन का कार्यान्वयन
  • पतों को निर्देशांक में ज्यामितीय रूप से परिवर्तित करना
  • स्थान-जागरूक एप्लिकेशन बनाना

मुख्य विशेषताएँ

  • क्रॉस-प्लेटफ़ॉर्म समर्थन (Android और iOS)
  • मूल नक्शा रेंडरिंग प्रदर्शन
  • मार्कर और पॉलीलाइन कस्टमाइजेशन
  • जियोकोडिंग और रिवर्स जियोकोडिंग
  • इंटरैक्टिव मानचित्र गेस्चर और इवेंट्स

इनके लिए उपयुक्त

  • रूस और सीआईएस बाजार के लिए एप्स
  • 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
  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;

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 3 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।