• Stars
    star
    125
  • Rank 286,335 (Top 6 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rx Wrapper For Android Google maps

RxGoogleMaps

Download API

Build Status codecov.io

Android Arsenal

A library which provides an RxJava wrapper for google maps. It is something similar to [Jake Whartons rxBindings] (https://github.com/JakeWharton/RxBinding) but for google maps.

This is currently using play services 17.0.0

Download

implementation 'com.github.minageorge5080:RxGoogleMaps:1.1.3'
implementation 'io.reactivex.rxjava2:rxjava:2.0.5'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'

Usage

Instantiate the MapObservableProvider by passing in a MapFragment, MapView or SupportMapFragment

MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.map);
mapObservableProvider = new MapObservableProvider(mapFragment);

You then have access to the GoogleMap observbles. They can be used like so

mapObservableProvider.getCameraMoveStartedObservable()
                .subscribe(integer -> Log.d(TAG, "map move started: " + integer),
                        throwable -> Log.e(TAG, throwable.getLocalizedMessage()));
        
mapObservableProvider.getMapLongClickObservable()
                .subscribe(latLng -> Log.d(TAG, "map long click"),
                        throwable -> Log.e(TAG, throwable.getLocalizedMessage()));
                        

You can find a more comprehensive example in the Example module.

API

There is one class to interact with which is MapObservableProvider. This has 3 constructors which accepts either...

  • MapFragment
  • SupportMapFragment
  • MapView

This provides the following observables...

  • MapReady
  • MapClick
  • MapLngClick
  • PolylineClick
  • PolygonClick
  • CircleClick
  • GroundOverlayClick
  • MarkerClick
  • InfoWindowClick
  • InfoWindowLongClick
  • InfoWindowClose
  • DragChange
  • CameraChange
  • CameraIdle
  • CameraMove
  • CameraMoveStarted
  • CameraMoveCanceled
  • IndoorBuildingChange
  • Snapshot

Example Setup

To use the example add MAP_API_KEY as an environment variable

License

Copyright (C) 2019 Mina George

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

Funny-Crash

Crash detector for android apps
Kotlin
15
star
2

FB-Messenger-layout

A copy of facebook messager app layout
Kotlin
8
star
3

Here-Guide

an android app that users can find easily the nearest places around them like restaurants, banks, schools ... etc and they can do following: 1- save a place that they love it 2- how to find it using map 3- can request uber 4- can enable notification when the user is nearby this place or make device silent or make an event related to this place 5 - can check in or share their location -> Technologies : 1- material design (DrawerLayout,CollapsingToolbarLayout,NavigationBottomBar,FloatingActionButton,PagerView, ..... etc) 2- using MVP design Pattern 3- SQLite database 4- Google service (places, maps) .
Java
5
star
4

whatsApp

A copy of what's App layout and also implement Room DB
Kotlin
2
star
5

uber

an android demo to display markers on map like uber contains 2 modules one is the upgrade of RXGoogleMaps using Kotlin and the second is the demo that responsable for drawing markers and cache them using arch component like room, mvvm and live data.
Kotlin
2
star
6

GoogleSearchBar

A simple SearchBar for Android
Kotlin
2
star
7

Pitch-Perfect

Pitch Perfect allows a user to record sound, then play the recording back with various effects.
Swift
1
star
8

BakingApp

Baking Application for making delicious recipes.
Java
1
star
9

image-uploader

Kotlin
1
star
10

GoSwap

An Android app to swap items between users like olx . -Design pattern : mvp. -Libs used : Retrofit, Glide, GoogleAPIs, Butterknife, Firebase ( chatting ), RoomDB. -Backend : python && mySQL.
Java
1
star
11

MVP-Demo

Sample app that implement MVP using Lifecycle-Aware Component
Java
1
star
12

Arabic-Documents-Classification

it is an NLP project can classify documents into its category like (culture, economy,...) using nltk lib
Python
1
star
13

news-app

Sample app that implement MVVM using android architecture component, RxJava and Dagger
Java
1
star
14

Deploy-a-high-availability-web-app-using-CloudFormation

Shell
1
star
15

Movie-App-Flutter

Dart
1
star
16

Listingdetails

an android app that loads data from different resources using rx and retrofit libs
Java
1
star