Class GSCircle

Extends GSVectorGraphics.

GSCircle represents a circle based on a center point and a radius.

Requires: svg module

Class Summary
Constructor Attributes Constructor Name and Description
 
GSCircle(center, radius, options)
Constructs a new GSCircle
Method Summary
Method Attributes Method Name and Description
 
Gets the minimum bounding box necessary to contain this map feature
 
setCenter(center)
Sets the center coordinate of this circle.
 
setRadius(radius)
Sets the radius of this circle.
 
Outputs a GML representation of this map feature.
 
Outputs a JSON representation of this map feature
 
Outputs a Well-Known Text (WKT) representation of this map feature.
Methods borrowed from class GSVectorGraphics:
getFill, getFillOpacity, getOpacity, getPreparedCanvasContext, getStroke, getStrokeLinecap, getStrokeLinejoin, getStrokeOpacity, getStrokeStyle, getStrokeWidth, getStyle, setFill, setFillOpacity, setOpacity, setStroke, setStrokeLinecap, setStrokeLinejoin, setStrokeOpacity, setStrokeStyle, setStrokeWidth, setStyle, setText, setVisible
Methods borrowed from class GSMapFeature:
addContextMenuItem, addEventHandler, addEventListener, addListener, deleteProperty, deselect, disableContextMenu, enableContextMenu, getContextMenu, getProperties, getProperty, isSelectable, isVisible, removeContextMenu, removeContextMenuItem, removeEventHandler, removeEventListener, removeEventListeners, removeListener, select, setContextMenu, setProperty, setTip, setZIndex, showInfoWindow
Events borrowed from class GSVectorGraphics:
shapeStyleChanged
Events borrowed from class GSMapFeature:
featureClicked, featureRemoved
Class Detail
GSCircle(center, radius, options)
Constructs a new GSCircle
Parameters:
{GSPoint} center
the coordinate of the circle center
{int} radius
the radius of the circle in metres
{Object} options Optional
optional configuration properties to set on this feature:
{Object} options.style
properties specified as name-value pairs. A subset of the SVG presentation attributes are supported:
{String} options.style.stroke
this property paints along the outline of the given graphical element. It takes a paint value which may be none indicating that no paint is applied, or a color value specified using either an HTML4 keyword, RGB hex value, or rgb(...) functional value Note that paint server URIs are not supported as paint values.
{int} options.style.stroke-width
the width of the stroke on the current object
{float} options.style.stroke-opacity
specifies the opacity of the painting operation used to stroke the current object. Value should be in the range of 0.0 (fully transparent) to 1.0 (fully opaque).
{String} options.style.stroke-linecap
specifies the shape of the endpoints of the painting operation used to stroke the current object. Value should be one of: butt | round | square.
{String} options.style.stroke-linejoin
specifies the way lines connect at the corners of the current object. Value should be one of: miter | round | bevel.
{float} options.style.stroke-opacity
specifies the opacity of the painting operation used to stroke the current object. Value should be in the range of 0.0 (fully transparent) to 1.0 (fully opaque).
{String} options.style.stroke-style
specifies the style of the line use to stroke the current object. Value should be one of: solid | dashed
{String} options.style.fill
this property paints the interior of the given graphical element. It takes a paint value which may be none indicating that no paint is applied, or a color value specified using either an HTML4 keyword, RGB hex value, or rgb(...) functional value Note that paint server URIs are not supported as paint values.
{String} options.style.fill-opacity
specifies the opacity of the painting operation used to paint the interior of the current object. Value should be in the range of 0.0 (fully transparent) to 1.0 (fully opaque).
{String} options.style.opacity
the uniform opacity setting to be applied across an entire object.
{String} options.text
a label to be displayed on this feature
{GSPoint} options.text-position
specifies the position of the text element relative to the coordinate system of the shape's bounding box. x and y values are specified in pixels
{Object} options.text-style
style properties specified as name-value pairs A subset of the CSS styling properties are supported:
{String} options.text-style.font-family
a prioritized list of font family names
{String} options.text-style.font-size
the size of the font, may use absolute or relative units
{String} options.text-style.font-weight
the boldness or lightness of the glyphs used to render the text, available values: normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 (higher values represent greater boldness)
{String} options.text-style.font-style
specifies whether the text is to be rendered using a normal, italic or oblique face, available values: normal | italic | oblique
{String} options.text-style.color
the color to render the text, may be specified using either an HTML4 keyword, RGB hex value, or rgb(...) functional value
{String} options.text-style.text-align
aligns the text within this shape. Availiable values: left | center | right
{String} options.text-style.vertical-align
vertically aligns the text within this shape. Available values: top | middle | bottom
Method Detail
{GSBounds} getBounds()
Gets the minimum bounding box necessary to contain this map feature
Returns:
the bounds of this map feature

setCenter(center)
Sets the center coordinate of this circle.
Parameters:
{GSPoint} center
the center of this circle expressed as an NZMG coordinate

setRadius(radius)
Sets the radius of this circle.
Parameters:
{integer} radius
the radius of this circle in metres

{string} toGML()
Outputs a GML representation of this map feature. Output is a GML 2.x string.
Returns:
a GML string

{string} toJson()
Outputs a JSON representation of this map feature
Returns:
a JSON string

{string} toWKT()
Outputs a Well-Known Text (WKT) representation of this map feature.
Returns:
a WKT string

Documentation generated by JsDoc Toolkit 2.3.2 on Wed Mar 07 2012 11:47:28 GMT+1300 (NZDT)