Search code examples
androidgoogle-mapsandroid-maps-v2

Android Google Map Marker With Label?


I'm getting on the server as a bitmap pictures(.png) and creating marker.

Marker marker;

                        marker = gmap.addMarker(new MarkerOptions()
                        .position(new LatLng(vehicle.getLat(), vehicle.getLong()))
                        .visible(true)
                        .icon(BitmapDescriptorFactory.fromBitmap(result)));

I would like to add custom text on my bitmap result bottom.

here we have an example but I can not http://binwaheed.blogspot.com.tr/2011/05/android-display-title-on-marker-in.html

Sample pic http://commondatastorage.googleapis.com/maps-devrel/utility-thumbnails/marker_with_label.png

Help me please. Thank u.


Solution

  • You can use IconGenerator (previously named BubbleIconFactory) from the android-map-utils library for effects like this:

    BubbleIconFactory Results