GoogleMap মিথস্ক্রিয়া সর্বোত্তম অনুশীলন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এই পৃষ্ঠাটি আপনার অ্যাপে GoogleMap
অবজেক্টের সাথে ইন্টারঅ্যাক্ট করার জন্য সর্বোত্তম অনুশীলনগুলি ব্যাখ্যা করে৷
একই মানচিত্রের উদাহরণে GoogleMap
বৈশিষ্ট্যগুলি প্রয়োগ করুন৷
ন্যাভিগেশন SDK-এর অংশ হিসাবে মানচিত্র APIগুলিও উপলব্ধ, যা আপনি মানচিত্র নির্দিষ্ট (নন-নেভিগেশন) অভিজ্ঞতা তৈরি করতে ব্যবহার করতে পারেন। যদি আপনার অ্যাপে নন-নেভিগেশন ম্যাপ অভিজ্ঞতা এবং নেভিগেশন অভিজ্ঞতা উভয়ই অন্তর্ভুক্ত থাকে, তাহলে আমরা একই মানচিত্রের উদাহরণে মানচিত্র এবং নেভিগেশন API ব্যবহার করার পরামর্শ দিই।
GoogleMap
উদাহরণ পেতে getMapAsync
ব্যবহার করুন
আপনি SupportNavigationFragment#getMapAsync
বা NavigationView#getMapAsync
ব্যবহার করে একটি GoogleMap
অবজেক্ট পেতে পারেন। আমরা GoogleMap
দৃষ্টান্ত ধরে রাখার জন্য এই পদ্ধতিটি সুপারিশ করি যা একবার NavigationView
নীচে পুনরায় তৈরি হয়ে গেলে বাসি হয়ে যেতে পারে।
এছাড়াও এই পদ্ধতি থেকে পুনরুদ্ধার করা GoogleMap
পরিষ্কার করতে ভুলবেন না পরে এটির আর প্রয়োজন নেই। আরও তথ্যের জন্য, ইনস্ট্যান্স ক্লিনআপ সেরা অনুশীলন দেখুন।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eImplement \u003ccode\u003eGoogleMap\u003c/code\u003e features on a separate map instance from navigation experiences to avoid conflicts and optimize performance.\u003c/p\u003e\n"],["\u003cp\u003eUse \u003ccode\u003egetMapAsync\u003c/code\u003e to retrieve the \u003ccode\u003eGoogleMap\u003c/code\u003e object instead of holding onto an instance, ensuring you have the most up-to-date map object and preventing stale data.\u003c/p\u003e\n"],["\u003cp\u003eRemember to clean up the \u003ccode\u003eGoogleMap\u003c/code\u003e object after use to prevent memory leaks and maintain optimal app performance, referring to the Instance cleanup best practices for detailed guidance.\u003c/p\u003e\n"]]],[],null,["# GoogleMap interaction best practices\n\nThis page explains best practices for interacting with the `GoogleMap` object in\nyour app.\n\nImplement `GoogleMap` features on the same maps instance\n--------------------------------------------------------\n\nMaps APIs are also available as part of Navigation SDK, which you can use to\nbuild map specific (non-navigation) experiences. If your app includes both a\nnon-navigation map experience and a navigation experience, we recommend using\nthe Maps and Navigation API on the same map instance.\n\nUse `getMapAsync` to obtain the `GoogleMap` instance\n----------------------------------------------------\n\nYou can obtain a `GoogleMap` object using either\n`SupportNavigationFragment#getMapAsync` or `NavigationView#getMapAsync`. We\nrecommend this method over holding onto the `GoogleMap` instance that might\nbecome stale once the `NavigationView` underneath is recreated.\n\nAlso be sure to clean up the `GoogleMap` retrieved from this method after it is\nno longer needed. For more information, see [Instance cleanup best\npractices](/maps/documentation/navigation/android-sdk/instance-cleanup-best-practices)."]]