public class Annotation extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Annotation.AnnotationLayer
This Enum is currently not used for the application layer.
|
static class |
Annotation.AnnotationStyle
The Enum define the annotation styles.
|
static class |
Annotation.AnnotationType
The map engine supports several annotation types.
|
static class |
Annotation.TouchType
The Enum for the touch type.
|
| Constructor and Description |
|---|
Annotation(android.content.Context activity,
int resourceId,
android.location.Location latLon)
This is the Default constructor for the Annotation class.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getAnnotationId()
This method is used to get the annotation Id for this annotation.
|
int |
getBitmapHeight() |
int |
getBitmapWidth() |
long |
getGraphicId()
This method is used to get the graphicId.
|
int |
getHeight() |
int |
getHorizontalAlignment()
This method returns the alignment parameter used to anchor the annotation horizontally
|
Annotation.AnnotationLayer |
getLayer()
This method is used to retrieve the current annotation layer information.
|
android.location.Location |
getLocation()
This method is used to get the anchor point of the current location.
|
String |
getPopupText()
This method returns the text associated with the current annotation.
|
Annotation.AnnotationStyle |
getStyle()
This method is used to get the annotation style.
|
Annotation.AnnotationType |
getType()
This method is used to get the annotation type.
|
int |
getVerticalAlignment()
This method returns the alignment parameter used to anchor the annotation vertically
|
int |
getWidth() |
int |
getX() |
int |
getY() |
boolean |
isHighlight() |
boolean |
needRefresh() |
boolean |
onTouch(int insideX,
int insideY,
Annotation.TouchType type)
The UIEvent handler; this method is triggered when the user takes action on the mapView.
|
void |
setAnnotationId(long annotationId)
This method updates the annotation Id; it should be called only within the MapKit, and should not be used by a client app.
|
void |
setGraphicId(long graphicId)
This method is used to set the graphicId.
|
void |
setHeight(int height) |
void |
setHorizontalAlignment(int horizontalAlignment)
This method sets the alignment parameter to be used to anchor the annotation vertically
|
void |
setIsHighlight(boolean isHighlight) |
void |
setLayer(Annotation.AnnotationLayer layer)
This method is used to update the current annotation layer information.
|
void |
setLocation(android.location.Location latLon)
This method is used to change the anchor point of the current annotation.
|
void |
setPopupText(String popupText)
This method associates to the current annotation a text that could be displayed when selected.
|
void |
setStyle(Annotation.AnnotationStyle style)
This method is used to set the annotation style.
|
void |
setType(Annotation.AnnotationType type)
This method is used to change the annotation type.
|
void |
setVerticalAlignment(int verticalAlignment)
This method sets the alignment parameter to be used to anchor the annotation vertically
|
void |
setWidth(int width) |
byte[] |
toAnnotationData()
This method is used to get the annotation image bitmap.
|
public Annotation(android.content.Context activity,
int resourceId,
android.location.Location latLon)
activity - the owner activity; used to retrieve resource and information if needed for the annotationresourceId - the image Resource Id; used for showing on the maplatLon - the anchor point of the annotationpublic final byte[] toAnnotationData()
public Annotation.AnnotationType getType()
public void setType(Annotation.AnnotationType type)
type - a value of the AnnotationType Enumpublic Annotation.AnnotationStyle getStyle()
public void setStyle(Annotation.AnnotationStyle style)
style - a value of the AnnotationStyle Enumpublic Annotation.AnnotationLayer getLayer()
public void setLayer(Annotation.AnnotationLayer layer)
layer - the annotation layer attached. if not attached, returns null.public android.location.Location getLocation()
public void setLocation(android.location.Location latLon)
Note: You cannot change this configuration after adding the annotation to mapView.
latLon - the new location for the annotation in latLon formatpublic boolean onTouch(int insideX,
int insideY,
Annotation.TouchType type)
insideX - the x location of the touch pointinsideY - the y location of the touch pointtype - an Enum value of the touch typepublic boolean needRefresh()
public boolean isHighlight()
public void setIsHighlight(boolean isHighlight)
isHighlight - public long getGraphicId()
public void setGraphicId(long graphicId)
graphicId - the OpenGL graphic Id for the current annotation.public long getAnnotationId()
public void setAnnotationId(long annotationId)
annotationId - the annotation Id to be setpublic String getPopupText()
public void setPopupText(String popupText)
popupText - text to associate with the current annotationpublic int getWidth()
public void setWidth(int width)
width - public int getHeight()
public void setHeight(int height)
height - public int getX()
public int getY()
public int getBitmapWidth()
public int getBitmapHeight()
public int getVerticalAlignment()
public void setVerticalAlignment(int verticalAlignment)
verticalAlignment - public int getHorizontalAlignment()
public void setHorizontalAlignment(int horizontalAlignment)
horizontalAlignment -