সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
RxJava হল একটি প্রতিক্রিয়াশীল প্রোগ্রামিং লাইব্রেরি যা পর্যবেক্ষণযোগ্য সিকোয়েন্স ব্যবহার করে অ্যাসিঙ্ক্রোনাস এবং ইভেন্ট-ভিত্তিক প্রোগ্রাম রচনা করার জন্য।
Maps Rx লাইব্রেরি আপনাকে Android এর জন্য Maps SDK এবং Android এর জন্য Places SDK-এ অ্যাসিঙ্ক্রোনাস ইভেন্টগুলির জন্য পর্যবেক্ষণযোগ্য সিকোয়েন্সগুলি পেতে দেয় যাতে আপনি RxJava বৈশিষ্ট্যগুলির সমৃদ্ধ সেটের সুবিধা নিতে পারেন৷
ইনস্টলেশন
আপনার Google মানচিত্র প্রকল্পে Maps Rx লাইব্রেরি ইনস্টল করতে:
আপনার মডিউল-স্তরের build.gradle ফাইলে নিম্নলিখিত নির্ভরতা যোগ করুন:
dependencies {// RxJava bindings for the Maps SDKimplementation("com.google.maps.android:maps-rx:1.0.0")// RxJava bindings for the Places SDKimplementation("com.google.maps.android:places-rx:1.0.0")// It is recommended to also include the latest Maps SDK, Places SDK and RxJava so you// have the latest features and bug fixes.implementation("com.google.android.gms:play-services-maps:19.2.0")implementation("com.google.android.libraries.places:places:4.3.1")implementation("io.reactivex.rxjava3:rxjava:3.1.8")
এই পরিবর্তনগুলি সিঙ্ক করতে Android স্টুডিওতে আপনার প্রকল্পটি পুনরায় তৈরি করুন৷
উদাহরণ ব্যবহার
GoogleMap অবজেক্টে একটি এক্সটেনশন ফাংশন হিসাবে মার্কার ক্লিক ইভেন্টগুলির জন্য একটি পর্যবেক্ষণযোগ্য গ্রহণ করুন:
googleMap.markerClickEvents().subscribe { marker ->
Log.d("MapsRx", "Marker ${marker.title} was clicked")}
পরবর্তী উদাহরণ আপনাকে দেখায় যে আপনি কিভাবে RxJava অপারেটর ব্যবহার করতে পারেন, merge , বিভিন্ন ক্যামেরা ইভেন্টকে একটি একক পর্যবেক্ষণযোগ্য স্ট্রীমে একত্রিত করতে:
Observable.merge(googleMap.cameraIdleEvents(),googleMap.cameraMoveEvents(),googleMap.cameraMoveCanceledEvents(),googleMap.cameraMoveStartedEvents()).subscribe {// Notified when any camera event occurs}
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["The Maps Rx library enables the use of RxJava with the Maps SDK and Places SDK for Android to handle asynchronous events."],["It provides observable sequences for events like marker clicks and camera movements, allowing developers to leverage RxJava features."],["You can install the library by adding specific dependencies to your `build.gradle` file and rebuilding your project."],["The library offers extension functions and operators to simplify the integration of RxJava with Google Maps functionality."]]],["The Maps Rx library, designed for use with RxJava, allows developers to receive observable sequences for asynchronous events on the Maps SDK and Places SDK for Android. To install, add dependencies for `maps-rx`, `places-rx`, and the latest `Maps SDK`, `Places SDK`, and `RxJava` to the `build.gradle` file, then rebuild the project. Developers can subscribe to events, like marker clicks, using extension functions. The library also supports merging multiple event types, such as various camera events, into a single observable stream using RxJava operators.\n"]]