|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Marker
Marker interface for all markers to be drawn on to maps. A marker has at least one location, and properties. A marker can be drawn, selected, and tested if hit.
Method Summary | |
---|---|
void |
draw(UnfoldingMap map)
Draws this marker. |
double |
getDistanceTo(Location location)
Calculate distance between this marker and the given location. |
java.lang.String |
getId()
Gets the marker ID. |
Location |
getLocation()
Gets the location of this marker. |
java.util.HashMap<java.lang.String,java.lang.Object> |
getProperties()
Gets the optional properties of this marker. |
java.lang.Object |
getProperty(java.lang.String key)
Gets the property for given key. |
java.lang.String |
getStringProperty(java.lang.String key)
Gets the property as String for given key. |
boolean |
isHidden()
Indicates whether this marker is hidden. |
boolean |
isInside(UnfoldingMap map,
float checkX,
float checkY)
Checks whether given position is inside this marker, according to the maps coordinate system. |
boolean |
isSelected()
Indicates whether this marker is selected. |
void |
setColor(int color)
Sets the main color of this marker. |
void |
setHidden(boolean hidden)
Sets the visibility status of this marker. |
void |
setId(java.lang.String id)
Sets the marker ID. |
void |
setLocation(float lat,
float lng)
Set the location for this marker. |
void |
setLocation(Location location)
Set the location for this marker. |
void |
setProperties(java.util.HashMap<java.lang.String,java.lang.Object> properties)
Sets the optional properties of this marker. |
void |
setSelected(boolean selected)
Changes the select status of this marker. |
void |
setStrokeColor(int color)
Sets the color of the border. |
void |
setStrokeWeight(int weight)
Sets the thickness of the border of this marker. |
Method Detail |
---|
java.lang.String getId()
void setId(java.lang.String id)
id
- The ID.Location getLocation()
void setLocation(float lat, float lng)
lat
- latitudelng
- longitudevoid setLocation(Location location)
location
- Location with lat, lngdouble getDistanceTo(Location location)
location
- The location to calculate the distance to.
void setProperties(java.util.HashMap<java.lang.String,java.lang.Object> properties)
properties
- The properties to set. The map consist of key,value pairs for each property.java.util.HashMap<java.lang.String,java.lang.Object> getProperties()
java.lang.Object getProperty(java.lang.String key)
key
- The key of the property.
java.lang.String getStringProperty(java.lang.String key)
key
- The key of the property.
boolean isInside(UnfoldingMap map, float checkX, float checkY)
map
- The map to draw on.checkX
- The x position to check in screen coordinates.checkY
- The y position to check in screen coordinates.
void draw(UnfoldingMap map)
map
- The map to draw on.void setSelected(boolean selected)
selected
- Whether this marker is selected or not.boolean isSelected()
void setHidden(boolean hidden)
hidden
- The new statusboolean isHidden()
void setColor(int color)
color
- The color (in Processing's color type)void setStrokeColor(int color)
color
- The color (in Processing's color type)void setStrokeWeight(int weight)
weight
- Thickness in pixel.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |