THIS SDK ISDEPRECATED.

We rolled out a new and better SDK for you.

Map ReactX Extensions

Additional classes that allow you to write reactive components using TomtomMap. Specific map callbacks (e.g., map click listener) are transformed to Observables so they can be easily integrated with RxJava2 types. This module does not add any new features to the existing TomtomMap API.

To use this library, add the following dependency to the build.gradle file:

api("com.tomtom.online:sdk-maps-rx-extensions:{libversion}")

To initialize the Rx wrapper for TomtomMap:

RxTomtomMap rxTomtomMap = new RxTomtomMap(tomtomMap)

To subscribe for map click events:

1Disposable mapClickDisposable = rxTomtomMap
2 .getOnMapClickObservable()
3 .observeOn(mainThread())
4 .subscribe(latLng -> displayMessage(
5 R.string.menu_events_on_map_click,
6 latLng
7 ));

API Reference

JavaDocMapRxExtensions_2.4.807 (JavaDocMapRxExtensions_2.4.807.zip)