Looking for advanced features to add to your maps? The Google Maps Android API Utility Library is an open-source library of classes that are useful for a range of applications.
- Import GeoJSON onto your map
- Import KML onto your map
- Add heatmaps to your map
- Customize markers via bubble icons
- Manage marker clusters
- Encode and decode polylines
- Calculate distances, areas and headings via spherical geometry
In this video, Chris Broadfoot discusses the utility library, with a focus on polyline decoding, spherical geometry, and bubble icons.
The source of the Google Maps Android API Utility Library is available on GitHub. The GitHub repository includes the utility classes and a demonstration application that illustrates the use of each class. To get started, follow the setup guide for Eclipse. Alternatively, the project's website includes a getting-started guide for Android Studio/Gradle and Maven. The reference documentation is also available on GitHub. Below is an overview of the utilities in the library.
Import GeoJSON onto your map
You can store features in GeoJSON
format and use this utility to render them as a layer on top of a map.
For details, see the documentation on the Google Maps Android GeoJSON Utility.
Import KML onto your map
Using this utility, you can convert
objects into geographical shapes and render them as a layer on
top of a map. Call
For details, see the documentation on the Google Maps Android KML Utility.
Add heatmaps to your map
Heatmaps make it easy for viewers to understand the distribution and
relative intensity of data points on a map. Rather than placing a marker at
each location, heatmaps use color and shape to represent the distribution
of the data. Create a
For details, see the documentation on the Google Maps Android Heatmap Utility.
Customize markers via bubble icons
Manage marker clusters
For details, see the documentation on the Google Maps Android Marker Clustering Utility.
Encode and decode polylines
In Google Maps, the latitude and longitude coordinates that define a polyline or polygon are stored as an encoded string. See the detailed explanation of polyline encoding. You may receive this encoded string in a response from a Google API, such as the Google Maps Directions API.
You can use
Calculate distances, areas and headings via spherical geometry
Using the spherical geometry utilities in
Refer to the reference documentation for a full list of methods in the utility.