Tuesday, January 15, 2013

Change marker color of GoogleMaps V2

To change color of the default marker of Google Maps Android API v2, add .icon(BitmapDescriptor) when create MarkerOptions.

  BitmapDescriptor bitmapDescriptor 
   = BitmapDescriptorFactory.defaultMarker(
     BitmapDescriptorFactory.HUE_AZURE);
  
  myMap.addMarker(new MarkerOptions()
        .position(point)
        .icon(bitmapDescriptor)
        .title(point.toString()));

change color of the default marker of Google Maps Android API v2


download filesDownload the files.

The series:
A simple example using Google Maps Android API v2, step by step.

1 comment:

Anonymous said...

thanks!