Class Index | File Index

Classes


Class mxn.Polyline


Defined in: mxn.core.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
mxn.Polyline(points)
Instantiates a new Polyline.
Method Summary
Method Attributes Method Name and Description
 
addData(options)
addData convieniently set a hash of options on a polyline
 
fromProprietary(apiId, polyline)
Retrieve the settings from a proprietary polyline.
 
Gets the value of "key"
 
hide()
Hide the polyline.
 
Whether the polyline is hidden.
 
setAttribute(key, value)
Set an arbitrary key/value pair on a polyline
 
setChild(some_proprietary_polyline)
 
setClosed(bClosed)
Marks the polyline as a closed polygon
 
setColor(color)
in the form: #RRGGBB Note map24 insists on upper case, so we convert it.
 
setFillColor(sFillColor)
Fill color for a closed polyline as HTML color value e.g.
 
setFillOpacity(opacity)
Set the opacity of the fill for a closed polyline
 
setOpacity(opacity)
Set the opacity of the line
 
setWidth(width)
Stroke width of the polyline
 
show()
Show the polyline.
 
simplify(tolerance)
Simplifies a polyline, averaging and reducing the points
 
Converts the current Polyline to a proprietary one for the API specified by apiId.
 
Updates the Polyline with the path of the attached proprietary polyline on the map.
Class Detail
mxn.Polyline(points)
Instantiates a new Polyline.
Parameters:
{Point[]} points
Points that make up the Polyline.
Method Detail
addData(options)
addData convieniently set a hash of options on a polyline
Parameters:
{Object} options
An object literal hash of key value pairs. Keys are: color, width, opacity, closed, fillColor.

fromProprietary(apiId, polyline)
Retrieve the settings from a proprietary polyline.
Parameters:
{String} apiId
The API ID of the proprietary polyline.
{Object} polyline
The proprietary polyline.

getAttribute(key)
Gets the value of "key"
Parameters:
{String} key
Returns:
value

hide()
Hide the polyline.

isHidden()
Whether the polyline is hidden.
Returns:
True if the polyline is hidden

setAttribute(key, value)
Set an arbitrary key/value pair on a polyline
Parameters:
{String} key
value

setChild(some_proprietary_polyline)
Parameters:
some_proprietary_polyline

setClosed(bClosed)
Marks the polyline as a closed polygon
Parameters:
{Boolean} bClosed

setColor(color)
in the form: #RRGGBB Note map24 insists on upper case, so we convert it.
Parameters:
color

setFillColor(sFillColor)
Fill color for a closed polyline as HTML color value e.g. #RRGGBB
Parameters:
{String} sFillColor
HTML color value #RRGGBB

setFillOpacity(opacity)
Set the opacity of the fill for a closed polyline
Parameters:
{Float} opacity
A float between 0.0 and 1.0

setOpacity(opacity)
Set the opacity of the line
Parameters:
{Float} opacity
A float between 0.0 and 1.0

setWidth(width)
Stroke width of the polyline
Parameters:
{Integer} width

show()
Show the polyline.

simplify(tolerance)
Simplifies a polyline, averaging and reducing the points
Parameters:
{Number} tolerance
(1.0 is a good starting point)

toProprietary(apiId)
Converts the current Polyline to a proprietary one for the API specified by apiId.
Parameters:
{String} apiId
The API ID of the proprietary polyline.
Returns:
A proprietary polyline.

update()
Updates the Polyline with the path of the attached proprietary polyline on the map.

©2009
Documentation generated by JsDoc Toolkit 2.1.1 on Sat Aug 06 2011 13:39:42 GMT-0700 (PDT)