public class InfoWindow
extends java.lang.Object
implements com.tigerknows.support.TKEventSource
Modifier and Type | Class and Description |
---|---|
static class |
InfoWindow.InfoWindowType |
static interface |
InfoWindow.OnTouchListener
listener for touch event
|
static class |
InfoWindow.TextAlign |
Modifier and Type | Field and Description |
---|---|
static int |
BACKGROUND_COLOR_CLICKED |
static int |
BACKGROUND_COLOR_UNCLICKED |
static boolean |
INFO_BORDER_ANTIALIAS |
static int |
INFO_BORDER_COLOR |
static int |
INFO_BORDER_SIZE |
static int |
INFO_ROUND_RADIUS |
static boolean |
INFO_TEXT_ANTIALIAS |
static int |
INFO_TEXT_COLOR |
static int |
INFO_TEXT_SIZE |
static int |
INFO_TEXTOFFSET_HORIZONTAL |
static int |
INFO_TEXTOFFSET_VERTICAL |
static int |
INFO_TRIANGLE_HEIGHT |
static int |
INFO_TRIANGLE_WIDTH |
static int |
MAX_CHARS_PER_LINE |
static int |
ZOOM_LEVEL |
Constructor and Description |
---|
InfoWindow()
public methods
|
Modifier and Type | Method and Description |
---|---|
void |
addEventListener(int eventType,
com.decarta.android.event.EventListener listener) |
void |
addOnTouchListener(InfoWindow.OnTouchListener listener)
event related methods
|
void |
clearTextureRef() |
void |
dispatchTouchEvent(MotionEvent ev) |
void |
drawInfoWindow(Canvas canvas,
XYFloat screenXY)
draw info window to canvas.
|
void |
drawInfoWindowOpenGL(GL10 gl,
XYFloat screenXY) |
void |
executeTouchListeners(MotionEvent ev) |
com.tigerknows.support.OverlayItem |
getAssociatedOverlayItem() |
int |
getBackgroundColor() |
RectF |
getInfoWindowRecF()
calculate the outer containing rectangular of the info window from the screen coordinate
|
Latlon |
getLatlon() |
XYDouble |
getMercXY() |
java.lang.String |
getMessage() |
XYFloat |
getOffset() |
com.decarta.android.map.RotationTilt |
getOffsetRotationTilt() |
com.tigerknows.map.Position |
getPosition() |
RectF |
getRect() |
InfoWindow.TextAlign |
getTextAlign() |
InfoWindow.InfoWindowType |
getType() |
ViewGroup |
getViewGroup() |
boolean |
isSupportedEventListener(int eventType,
com.decarta.android.event.EventListener listener) |
boolean |
isVisible() |
void |
removeAllEventListeners(int eventType) |
void |
removeEventListener(int eventType,
com.decarta.android.event.EventListener listener) |
void |
setAssociatedOverlayItem(com.tigerknows.support.OverlayItem associatedOverlyaItem) |
void |
setBackgroundColor(int backgroundColor) |
void |
setLatlon(Latlon latlon) |
void |
setMessage(java.lang.String message) |
void |
setOffset(XYFloat offset) |
void |
setOffset(XYFloat offset,
com.decarta.android.map.RotationTilt offsetRotationTilt) |
void |
setPosition(com.tigerknows.map.Position position) |
void |
setTextAlign(InfoWindow.TextAlign textAlign) |
void |
setViewGroup(ViewGroup viewGroup) |
void |
setVisible(boolean visible) |
public static final int ZOOM_LEVEL
public static int MAX_CHARS_PER_LINE
public static int BACKGROUND_COLOR_CLICKED
public static int BACKGROUND_COLOR_UNCLICKED
public static int INFO_TRIANGLE_HEIGHT
public static int INFO_TRIANGLE_WIDTH
public static int INFO_TEXTOFFSET_VERTICAL
public static int INFO_TEXTOFFSET_HORIZONTAL
public static int INFO_ROUND_RADIUS
public static int INFO_BORDER_SIZE
public static int INFO_BORDER_COLOR
public static boolean INFO_BORDER_ANTIALIAS
public static boolean INFO_TEXT_ANTIALIAS
public static int INFO_TEXT_COLOR
public static int INFO_TEXT_SIZE
public XYFloat getOffset()
public void setOffset(XYFloat offset)
public void setOffset(XYFloat offset, com.decarta.android.map.RotationTilt offsetRotationTilt)
offset
- info window's center bottom point is position.x-offset.x, position.y-offset.yoffsetRotationTilt
- rotation and tilt of the offset line. When draw the info window, we need to calculate start
from the info window position, go through the offset, then we get the coordinate of the center bottom
point as the info window arrow pointed at. The offset is normally caused by the pin between the infowindow and the
pin's position.public java.lang.String getMessage()
public void setMessage(java.lang.String message)
public ViewGroup getViewGroup()
public void setViewGroup(ViewGroup viewGroup)
public InfoWindow.InfoWindowType getType()
public void clearTextureRef()
public Latlon getLatlon()
public com.tigerknows.map.Position getPosition()
public void setLatlon(Latlon latlon)
public void setPosition(com.tigerknows.map.Position position) throws com.decarta.android.exception.APIException
com.decarta.android.exception.APIException
public boolean isVisible()
public void setVisible(boolean visible)
public int getBackgroundColor()
public void setBackgroundColor(int backgroundColor)
public com.tigerknows.support.OverlayItem getAssociatedOverlayItem()
public void setAssociatedOverlayItem(com.tigerknows.support.OverlayItem associatedOverlyaItem)
public com.decarta.android.map.RotationTilt getOffsetRotationTilt()
public RectF getRect()
public InfoWindow.TextAlign getTextAlign()
public void setTextAlign(InfoWindow.TextAlign textAlign)
public XYDouble getMercXY()
public void addOnTouchListener(InfoWindow.OnTouchListener listener)
public void addEventListener(int eventType, com.decarta.android.event.EventListener listener) throws com.decarta.android.exception.APIException
addEventListener
in interface com.tigerknows.support.TKEventSource
com.decarta.android.exception.APIException
public boolean isSupportedEventListener(int eventType, com.decarta.android.event.EventListener listener)
isSupportedEventListener
in interface com.tigerknows.support.TKEventSource
public void removeAllEventListeners(int eventType)
removeAllEventListeners
in interface com.tigerknows.support.TKEventSource
public void removeEventListener(int eventType, com.decarta.android.event.EventListener listener) throws com.decarta.android.exception.APIException
removeEventListener
in interface com.tigerknows.support.TKEventSource
com.decarta.android.exception.APIException
public void executeTouchListeners(MotionEvent ev)
public void dispatchTouchEvent(MotionEvent ev)
public RectF getInfoWindowRecF()
infoWindow
- screenXY
- the screen coordinate of the anchor point of the info windowpublic void drawInfoWindow(Canvas canvas, XYFloat screenXY)
canvas
- infoWindow
- screenXY
- public void drawInfoWindowOpenGL(GL10 gl, XYFloat screenXY)