com.google.android.maps.OverlayItem
Summary
Constants
Fields
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Constants
public
static
final
int
ITEM_STATE_FOCUSED_MASK
State bitset bit: Indicates the overlay item is in the focused state.
Constant Value:
4
(0x00000004)
public
static
final
int
ITEM_STATE_PRESSED_MASK
State bitset bit: indicates the overlay item is in the pressed state.
Constant Value:
1
(0x00000001)
public
static
final
int
ITEM_STATE_SELECTED_MASK
State bitset bit: Indicates the overlay item is in the selected state.
Constant Value:
2
(0x00000002)
Fields
protected
Drawable
mMarker
The overlay marker used to indicate this item.
protected
final
GeoPoint
mPoint
Position of this item.
protected
final
String
mSnippet
Snippet text of this item.
protected
final
String
mTitle
Title text of this item.
Public Constructors
public
OverlayItem(GeoPoint point, String title, String snippet)
Construct an overlay item.
Parameters
point
| Position of the item. |
title
| Title text. |
snippet
| Snippet text.
|
Public Methods
public
Drawable
getMarker(int stateBitset)
Returns the marker that should be used when drawing this item
on the map. A null value means that the default marker should
be drawn.
Different markers can be returned for different states. The different
markers can have different bounds.
The default behavior is to call
setState(Drawable, int) on the overlay
item's marker, if it exists, and then return it.
Parameters
stateBitset
| The current state. |
Returns
- The marker for the current state, or null if the default
marker for the overlay should be used.
public
GeoPoint
getPoint()
Returns the GeoPoint of this overlay.
public
String
getSnippet()
Returns the snippet text of this overlay.
public
String
getTitle()
Returns the title text of this overlay.
public
String
routableAddress()
Returns the position of this item in a map-routable format.
Returns
- By default, a String with the latitude and longitude (comma-separated),
in degrees (not microdegrees).
public
void
setMarker(Drawable marker)
Sets the marker to be used when drawing this item on the map.
Setting the marker to null will cause the default marker to
be drawn (the marker is null by default, so you can just skip this,
instead). The marker may be drawn using any combination of the
null,
state_pressed,
state_selected and
state_focused attributes.
public
static
void
setState(Drawable drawable, int stateBitset)
Sets the state of a drawable to match a given state bitset. This is done
by converting the state bitset bits into a state set of
state_pressed,
state_selected and
state_focused attributes, and then
calling
setState(int[]).
Parameters
drawable
| The drawable to modify. |
stateBitset
| The state bitset to set.
|