Skip to content
Tobias Preuss edited this page Jun 29, 2014 · 3 revisions

Welcome to the android-maps-extensions wiki!

Motivation

Google Maps Android API v2 is one small step for Google, a giant leap for Android developers. Even though some said it carries a lot of limitations and is not extensible, Android Maps Extensions brings a few very useful features, most notably: Marker Clustering and ability to carry model data within markers (and other visual objects) to be retrieved as needed.

Extensions

Currently implemented extensions include:

  • Marker Clustering with GoogleMap.setClustering(ClusteringSettings)
  • ClusteringSettings.clusterOptionsProvider(ClusterOptionsProvider) is required for it all to work
  • ClusteringSettings.addMarkersDynamically when having too many markers
  • ClusteringSettings.clusterSize to control... cluster size
  • Object getData() and setData(Object) on Marker, Circle, GroundOverlay, Polygon, Polyline or TileOverlay
  • List<Marker> GoogleMap.getMarkers() and
  • List<Circle> GoogleMap.getCircles()
  • List<GroundOverlay> GoogleMap.getGroundOverlays() etc.
  • boolean Circle.contains(LatLng)
  • Marker GoogleMap.getMarkerShowingInfoWindow()
  • List<Marker> GoogleMap.getDisplayedMarkers()
  • float GoogleMap.getMinZoomLevelNotClustered(Marker)
  • Marker.animatePosition(LatLng target, AnimationSettings settings)
  • Marker.setClusterGroup(int)

Development

Focusing on:

  • keeping up with the latest release
  • performance
  • bugfixing (especially clustering engine)
  • please post any issues you notice
  • adding more APIs not available in the original library

Migration from Android API v2

When migrating to Extensions, all you have to change is: a couple of import statements, SupportMapFragment (or MapView) full class names in xml and call getExtendedMap instead of getMap on SupportMapFragment (or MapView).

Note for versions 2.x: also add google-play-services-lib (or keep it if you were already using it). Since 2.0 this library is decoupled from Google Play Services and you may use any version from 3.2.65 (the last working on Android API 8) or above. Note for versions 1.x (deprecated): you will have to remove original google-play-services-lib from your workspace, as this library replaces it.

See reference commit for how it was done in Google Play Services maps samples.

Maven users

To build and run using maven:

mvn install (this also installs dependencies missing from the central repo)
cd android-maps-extensions-demo
mvn android:deploy android:run

Eclipse-maven-android integration seems to be buggy. You will have to delete libs folder after installing dependencies with mvn install and maybe do strange things like Maven->Update project or closing and reopening demos.

If you know how to work around these problems, please contact me. Here are issues that seem relevant:

Attribution Requirements

While you don't need to reference this library inside your project in any way you may still need to add Google Play Services attribution text as described under Attribution Requirements.

Versions

Check out wiki on GitHub.

Questions or problems using Extensions?

The best way to resolve any problems (that are not bugs or feature requests) is by asking a question on StackOverflow with a tag android-maps-extensions.

Like Forking?

This project is also available on GitHub and Bitbucket.

Clone this wiki locally