public class MultiMarker extends java.lang.Object implements Marker
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hidden |
protected java.lang.String |
id |
protected java.util.List<Marker> |
markers |
java.util.HashMap<java.lang.String,java.lang.Object> |
properties |
protected boolean |
selected |
| Constructor and Description |
|---|
MultiMarker() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMarkers(Marker... markers) |
void |
draw(UnfoldingMap map)
Draws this marker.
|
double |
getDistanceTo(Location location)
return distance between location and the (to the location) closest marker
|
java.lang.String |
getId()
Gets the marker ID.
|
java.lang.Integer |
getIntegerProperty(java.lang.String key)
Gets the property as Integer for given key.
|
Location |
getLocation()
Return center of all markers.
|
java.util.List<Marker> |
getMarkers() |
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)
Returns true if at least one marker is hit.
|
boolean |
isInsideByLocation(float latitude,
float longitude)
Returns true if at least one marker is hit.
|
boolean |
isSelected()
Indicates whether this multi 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 |
setHighlightColor(int color)
Sets the highlight color of this marker.
|
void |
setHighlightStrokeColor(int color)
Sets the highlight color of this marker's border.
|
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 |
setMarkers(java.util.List<Marker> markers) |
void |
setProperties(java.util.HashMap<java.lang.String,java.lang.Object> properties)
Sets the optional properties of this marker.
|
java.lang.Object |
setProperty(java.lang.String key,
java.lang.Object value)
Sets the property for given key.
|
void |
setSelected(boolean selected)
Sets the selected status of all its markers.
|
void |
setStrokeColor(int color)
Sets the color of this marker's border.
|
void |
setStrokeWeight(int weight)
Sets the thickness of the border of this marker.
|
protected java.util.List<Marker> markers
public java.util.HashMap<java.lang.String,java.lang.Object> properties
protected boolean selected
protected boolean hidden
protected java.lang.String id
public java.lang.String getId()
Markerpublic void setId(java.lang.String id)
Markerpublic void setMarkers(java.util.List<Marker> markers)
public java.util.List<Marker> getMarkers()
public void addMarkers(Marker... markers)
public Location getLocation()
GeoUtils.getCentroid(List) instead.getLocation in interface Markerpublic void setLocation(float lat,
float lng)
MarkersetLocation in interface Markerlat - latitudelng - longitudepublic void setLocation(Location location)
MarkersetLocation in interface Markerlocation - Location with lat, lngpublic double getDistanceTo(Location location)
getDistanceTo in interface Markerlocation - The location to calculate the distance to.public void setProperties(java.util.HashMap<java.lang.String,java.lang.Object> properties)
MarkersetProperties in interface Markerproperties - The properties to set. The map consist of key,value pairs for each property.public java.lang.Object setProperty(java.lang.String key,
java.lang.Object value)
MarkersetProperty in interface Markerkey - The key of the property.value - The value of the property.public java.util.HashMap<java.lang.String,java.lang.Object> getProperties()
MarkergetProperties in interface Markerpublic java.lang.Object getProperty(java.lang.String key)
MarkergetProperty in interface Markerkey - The key of the property.public java.lang.String getStringProperty(java.lang.String key)
MarkergetStringProperty in interface Markerkey - The key of the property.public java.lang.Integer getIntegerProperty(java.lang.String key)
MarkergetIntegerProperty in interface Markerkey - The key of the property.public boolean isInside(UnfoldingMap map, float checkX, float checkY)
public boolean isInsideByLocation(float latitude,
float longitude)
AbstractShapeMarker.isInsideByLocation(float, float).public void draw(UnfoldingMap map)
Markerpublic void setSelected(boolean selected)
setSelected in interface Markerselected - Whether this marker is selected or not.public boolean isSelected()
isSelected in interface Markerpublic void setHidden(boolean hidden)
Markerpublic boolean isHidden()
Markerpublic void setColor(int color)
Markerpublic void setStrokeColor(int color)
MarkersetStrokeColor in interface Markercolor - The color (in Processing's color type)public void setStrokeWeight(int weight)
MarkersetStrokeWeight in interface Markerweight - Thickness in pixel.public void setHighlightColor(int color)
MarkersetHighlightColor in interface Markercolor - The color (in Processing's color type)public void setHighlightStrokeColor(int color)
MarkersetHighlightStrokeColor in interface Marker