BlinkingMarker workaround for Google Maps v2
Switch branches/tags
Nothing to show
Latest commit a952677 Mar 8, 2013 @balazsbalazs Merge pull request #1 from wcmatthysen/master
Maven integration
Failed to load latest commit information.
libs Initial commit Jan 23, 2013
.gitignore Updated .gitignore. Mar 8, 2013
AndroidManifest.xml Adding readme Jan 23, 2013
pom.xml Added pom.xml for mavenized builds. Mar 8, 2013
proguard-project.txt Initial commit Jan 23, 2013


This is a workaround for creating a blinking marker in Google Maps v2 for Android.

I've raised an issue with the maps team and hopefully they're already working on this:


The idea behind a workaround is to create a series of markers with the same icon but different opacity defined. After that show periodically a marker with different opacity on the map. You can either add/remove the appropriate marker but that results in a lot of GC. The "better" solution is to add all of the markers at once and only change their visibility. This solution consumes more memory but not that much continuous allocations.


Add the marker to the map and initialize it.

public void onCreate(Bundle savedInstanceState) {
    Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.mapicon_taxi);
    marker = new BlinkingMarker(bitmap, mMap, fps, duration);
    marker.addToMap(new LatLng(14.6, 54.6));

Move the marker:

marker.move(new LatLng(14.7, 54.6));

Stop the blinking on onPause()

public void onPause() {


There is a sample activity in the source which illustrates all the capabilities of the marker.

In order to set it up you need to:

  • change the google maps v2 key in res/values/maps_key.xml
  • add the Google Play Services library project to the project