Skip to content

googlemaps/android-maps-rx

Maven Central

Beta Release Tests/Build

Contributors License StackOverflow Discord

Maps Android Rx

⚠️ PROJECT ARCHIVED & DEPRECATED ⚠️

This library is no longer maintained and has been officially archived.

Why is this project being retired?

Since the launch of this project, the Android ecosystem has largely transitioned from RxJava to Kotlin Coroutines and Flows. In alignment with modern Android development practices, maintenance effort has shifted to libraries that natively support these features.

Alternatives and Migration

  1. Maps SDK for Android KTX: We recommend using the Maps SDK for Android KTX. This is the current standard for idiomatic Kotlin development and provides native support for Coroutines and Flow.
  2. Bridging to RxJava: If your codebase remains strictly RxJava-based, you can use the Maps KTX library and convert the resulting Flows into Observables using the Kotlinx Coroutines RxJava bridge.
  3. Source Access: The source code for these Rx wrappers remains available in this repository for reference or manual inclusion in your project. However, no further updates, bug fixes, or dependency bumps will be performed.

Final Maintenance Note

This project is being archived to provide clarity to the developer community and to ensure users are directed toward the most active and supported tools for the Maps SDK.

Description

This repository contains RxJava bindings for the Maps SDK for Android and Places SDK for Android.

Requirements

Installation

dependencies {
    // RxJava bindings for the Maps SDK
    implementation 'com.google.maps.android:maps-rx:1.0.1' // {x-release-please-version}

    // RxJava bindings for the Places SDK
    implementation 'com.google.maps.android:places-rx:1.0.1' // {x-release-please-version}

    // 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:<insert-latest-version>'
    implementation 'com.google.android.libraries.places:places:<insert-latest-version>'
    implementation 'io.reactivex.rxjava3:rxjava:<insert-latest-version>'
}

Example Usage

Marker Clicks (Maps)

val googleMap = // ...
googleMap.markerClicks()
  .subscribe { marker ->
    Log.d("DEBUG", "Marker ${marker.title} was clicked")
  }

Combining camera events (Maps)

val googleMap = // ...
merge(
    googleMap.cameraIdleEvents(),
    googleMap.cameraMoveEvents(),
    googleMap.cameraMoveCanceledEvents(),
    googleMap.cameraMoveStartedEvents()
).subscribe {
    // Notified when one of the events triggered here
}

Fetching a Place (Places)

val placesClient = // ...
placesClient.fetchPlace(
    placeId = "thePlaceId",
    placeFields = listOf(Place.Field.ID, Place.Field.NAME, Place.Field.ADDRESS)
).subscribe {
    // Notified when fetch completes/fails
}

Documentation

See the documentation for a full list of classes and their methods.

Full guides for using the utilities are published in Google Maps Platform documentation.

Contributing

Contributions are welcome and encouraged! If you'd like to contribute, send us a pull request and refer to our code of conduct and contributing guide.

Terms of Service

This library uses Google Maps Platform services. Use of Google Maps Platform services through this library is subject to the Google Maps Platform Terms of Service.

If your billing address is in the European Economic Area, effective on 8 July 2025, the Google Maps Platform EEA Terms of Service will apply to your use of the Services. Functionality varies by region. Learn more.

This library is not a Google Maps Platform Core Service. Therefore, the Google Maps Platform Terms of Service (e.g. Technical Support Services, Service Level Agreements, and Deprecation Policy) do not apply to the code in this library.

Support

This library is offered via an open source license. It is not governed by the Google Maps Platform Support [Technical Support Services Guidelines, the SLA, or the Deprecation Policy. However, any Google Maps Platform services used by the library remain subject to the Google Maps Platform Terms of Service.

This library adheres to semantic versioning to indicate when backwards-incompatible changes are introduced. Accordingly, while the library is in version 0.x, backwards-incompatible changes may be introduced at any time.

If you find a bug, or have a feature request, please file an issue on GitHub. If you would like to get answers to technical questions from other Google Maps Platform developers, ask through one of our developer community channels. If you'd like to contribute, please check the contributing guide.

You can also discuss this library on our Discord server.

About

RxJava bindings for the Maps and Places SDKs for Android

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages