Wednesday, January 16, 2013

Load custom marker on GoogleMap V2

To load custom icon as marker of GoogleMap V2, save the icon in drawable folder. Load it using the code:

  
  BitmapDescriptor bitmapDescriptor 
   = BitmapDescriptorFactory.fromResource(R.drawable.ic_launcher);
  
  myMap.addMarker(new MarkerOptions()
        .position(point)
        .icon(bitmapDescriptor)
        .title(point.toString()));


GoogleMap V2 with custom marker


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

No comments:

Post a Comment