Class deCarta.Mobile.Circle
Circle is used to display a circle on the map. It extends deCarta.Mobile.OverlayObject. Use the deCarta.Mobile.MapOverlay:addObject() method to add this object to a map overlay.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
deCarta.Mobile.Circle(options)
A map overlay object used to draw a polygon
|
| Method Attributes | Method Name and Description |
|---|---|
|
Gets the radius of the circle, converted to pixels
|
|
|
Retrieve the radius of the circle.
|
|
|
setRadius(r)
Dynamically set the radius of the circle.
|
Class Detail
deCarta.Mobile.Circle(options)
A map overlay object used to draw a polygon
- Parameters:
- {object} options
- Options. May contain one or more of the following:
- deCarta.Mobile.Position position: The position of the center of the circle - required
- radius: The radius of the circle in meters - optional, default 500
- strokeColor: Color of the circle border - optional, default '#0077D2'
- strokeWidth: Thickness of the circle border, in pixels - optional, default 2
- fillColor: Fill color of the circle - optional, default '#0077D2'
- opacity: Opacity of the circle (1.0 = opaque, 0.0 = transparent) - optional, default 0.3
Method Detail
{int}
getPixelRadius(z)
Gets the radius of the circle, converted to pixels
- Parameters:
- z
- {int} Zoom level for which we want the pixel dimension
- Returns:
- {int} Radius, in pixels
{float}
getRadius()
Retrieve the radius of the circle.
- Returns:
- {float} Radius, in meters
setRadius(r)
Dynamically set the radius of the circle. It will readjust accordingly.
- Parameters:
- {float} r
- the radius, in meters.