CustomCap

public final class CustomCap extends Cap

Bitmap overlay centered at the start or end vertex of a Polyline, orientated according to the direction of the line's first or last edge and scaled with respect to the line's stroke width. CustomCap can be applied to Polyline with any stroke pattern.

Inherited Constant Summary

int CONTENTS_FILE_DESCRIPTOR
int PARCELABLE_WRITE_RETURN_VALUE

Field Summary

public final BitmapDescriptor bitmapDescriptor Descriptor of the bitmap to be overlaid at the start or end vertex.
public final float refWidth Reference stroke width (in pixels) - the stroke width for which the cap bitmap at its native dimension is designed.

Public Constructor Summary

CustomCap(BitmapDescriptor bitmapDescriptor, float refWidth)
Constructs a new CustomCap.
CustomCap(BitmapDescriptor bitmapDescriptor)
Constructs a new CustomCap with default reference stroke width of 10 pixels (equal to the default stroke width, see PolylineOptions.width(float)).

Public Method Summary

Inherited Method Summary

com.google.android.gms.maps.model.Cap
boolean
int
String
void
writeToParcel(Parcel out, int flags)
Object
clone()
boolean
equals(Object arg0)
void
finalize()
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
abstract int
describeContents()
abstract void
writeToParcel(Parcel arg0, int arg1)

Fields

public final BitmapDescriptor bitmapDescriptor

Descriptor of the bitmap to be overlaid at the start or end vertex.

public final float refWidth

Reference stroke width (in pixels) - the stroke width for which the cap bitmap at its native dimension is designed. The default reference stroke width is 10 pixels.

Public Constructors

public CustomCap (BitmapDescriptor bitmapDescriptor, float refWidth)

Constructs a new CustomCap.

Parameters
bitmapDescriptor Descriptor of the bitmap to be used. Must not be null.
refWidth Stroke width, in pixels, for which the cap bitmap at its native dimension is designed. Must be positive.

public CustomCap (BitmapDescriptor bitmapDescriptor)

Constructs a new CustomCap with default reference stroke width of 10 pixels (equal to the default stroke width, see PolylineOptions.width(float)).

Parameters
bitmapDescriptor Descriptor of the bitmap to be used. Must not be null.

Public Methods

public String toString ()