Handy extensions to the Google Maps Android API. github.com/googlemaps/android-maps-utils

Introduction

This open-source library contains classes that are useful for a wide range of applications using the Google Maps Android API.

The library is under heavy development, but ready for use. Check the issue tracker to see what’s happening.

Features/Overview

Marker clustering — handles the display of a large number of points

Heat maps — display a large number of points as a heat map

IconGenerator — display text on your Markers (see screenshot to the right)

Poly decoding and encoding — compact encoding for paths, interoperability with Maps API web services

Spherical geometry — for example: computeDistance, computeHeading, computeArea

KML — displays KML data (Caution: Beta!)

GeoJSON — displays and styles GeoJSON data



An introductory video:

Getting Started

The current version of the library is 0.4 .

Android Studio/Gradle

Add the following dependency to your Gradle build file:

dependencies { compile 'com.google.maps.android:android-maps-utils:0.4+' }

Maven

Add the following to your pom.xml :

<dependency> <groupId>com.google.maps.android</groupId> <artifactId>android-maps-utils-apklib</artifactId> <version>0.4+</version> <type>apklib</type> </dependency>

Note: you must have Google Play services included in your project already. See JakeWharton/gms-mvn-install for one way to do this.

Eclipse/ADT

The library is distributed as a Android library project. See the guide on Android developers for instructions on setting up a library project.

Check out the repository from GitHub and reference the library subdirectory.

(zip download is coming soon)

Feedback

Feedback and feature requests can be filed on the GitHub issue tracker.

Source code

The project is hosted on GitHub.

Building the project

The project uses the Gradle build system. Use of the Gradle wrapper ( gradlew ) is preferred, as it keeps the build more contained (“hermetic”, if you enjoy that kind of thing).</p>

Ensure your ANDROID_HOME environment variable is set correctly. This may be something like "/Applications/Android Studio.app/sdk/" on Mac OS X.

You will also need to download the “Google Repository” in the SDK Manager. (You should be using it in your project already!)

# Build everything $ ./gradlew assemble # Run tests $ ./gradlew instrumentTest # Install demo app on connected device # Don't forget to put your own API key in AndroidManifest.xml! $ ./gradlew installDebug

Contributions

Contributions are welcomed. You can submit a pull request via GitHub.

For your first contribution, you will need to fill out one of the contributor license agreements:

If you are the copyright holder, you will need to agree to the individual contributor license agreement, which can be completed online.

If your organization is the copyright holder, the organization will need to agree to the corporate contributor license agreement. (If the copyright holder for your code has already completed the agreement in connection with another Google open source project, it does not need to be completed again.)

License