Class mxn.Polyline
Defined in: mxn.core.js.
Constructor Attributes | Constructor Name and Description |
---|---|
mxn.Polyline(points)
Instantiates a new Polyline.
|
Method Attributes | Method Name and Description |
---|---|
addData(options)
addData conviniently set a hash of options on a polyline
|
|
fromProprietary(apiId, polyline)
Retrieve the settings from a proprietary polyline.
|
|
getAttribute(key)
Gets the value of "key"
|
|
hide()
Hide the polyline.
|
|
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.
|
|
setOpacity(opacity)
A float between 0.0 and 1.0
|
|
setWidth(width)
Stroke width of the polyline
|
|
show()
Show the polyline.
|
|
simplify(tolerance)
Simplifies a polyline, averaging and reducing the points
|
|
toProprietary(apiId)
Converts the current Polyline to a proprietary one for the API specified by apiId.
|
|
update()
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 conviniently 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.
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
setOpacity(opacity)
A float between 0.0 and 1.0
- Parameters:
- {Float} opacity
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.