public class MarkerShape extends MapObject
Modifier and Type | Class and Description |
---|---|
protected static class |
MarkerShape.Property |
Constructor and Description |
---|
MarkerShape()
Creates new MarkerShape object.
|
MarkerShape(Map map)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
double[] |
getCoords()
Returns value of coords property.
|
java.lang.String |
getType()
Returns value of type property.
|
void |
setCoords(double[] coords)
Sets new value for coords property.
|
void |
setType(java.lang.String value)
Sets new value for type property.
|
addEventListener, attachObject, cacheProperties, cacheProperties, clone, createJSValue, dispose, fromJSValue, getJSObject, getMap, getProperties, invokeMethod, propertyChanged, removeEventListener, updateProperty
public MarkerShape()
@Deprecated public MarkerShape(Map map)
map
- owner Map objectpublic java.lang.String getType()
Describes the shape's type and can be circle, poly or rect.
setType(java.lang.String)
public void setType(java.lang.String value)
value
- new property valuegetType()
public double[] getCoords()
The format of this attribute depends on the value of the type and follows the w3 AREA coords specification found at http://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords. The coords attribute is an array of integers that specify the pixel position of the shape relative to the top-left corner of the target image. The coordinates depend on the value of type as follows:
circle: coords is [x1,y1,r] where x1,y2 are the coordinates of the center of the circle, and r is the radius of the circle.
poly: coords is [x1,y1,x2,y2...xn,yn] where each x,y pair contains the coordinates of one vertex of the polygon.
rect: coords is [x1,y1,x2,y2] where x1,y1 are the coordinates of the upper-left corner of the rectangle and x2,y2 are the coordinates of the lower-right coordinates of the rectangle.
setCoords(double[])
public void setCoords(double[] coords)
coords
- new property valuegetCoords()