Nokia Maps API Reference

Contents

Class nokia.maps.kml.LineString

Class Summary

This class represents the tag from KML specification.

new nokia.maps.kml.LineString (node, lineStyle, balloonStyle)
Method Summary
getCenterCoordinate () : nokia.maps.geo.Coordinate This method calculates the arithmetic average of all coordinates.
getPath () : Array This method converts the coordinates from string format to an array of instances of nokia.maps.geo.Coordinate.
getStyle () : Object This method gets the styles for the given object.
Field Summary
static String DEFAULT_STROKE_COLOR Default stroke color for KML line object
static Number DEFAULT_STROKE_WIDTH Default stroke width for KML line object
String coordinates Two or more coordinate tuples, each consisting of floating point values for longitude, latitude, and altitude.
Direct Inheritance
Indirect Inheritance
Constructor Detail

Initialize a new instance of the class with the following parameters.

new nokia.maps.kml.LineString(node, lineStyle, balloonStyle)
Parameters:
{Node} node An XML node from KML document, which is currently parsed
{nokia.maps.kml.LineStyle} lineStyle An object representing the line style to be used during conversion to a map object
{nokia.maps.kml.BalloonStyle} balloonStyle An object representing the balloon style to use during conversion to a map object
Method Detail
getCenterCoordinate () : nokia.maps.geo.Coordinate
This method calculates the arithmetic average of all coordinates.
Returns:
{nokia.maps.geo.Coordinate} An instance of nokia.maps.geo.Coordinate representing the calculated average
getPath () : Array
This method converts the coordinates from string format to an array of instances of nokia.maps.geo.Coordinate. If the array has fewer than two coordinates, then null is returned.
Returns:
{Array} An array of instances of nokia.maps.geo.Coordinate objects or null if the conversion finished unsuccessfully or the array has fewer than two coordinates.
getStyle () : Object
This method gets the styles for the given object.
Returns:
{Object} An object with two properties "color" and "width".
Field Detail
static String DEFAULT_STROKE_COLOR
Default stroke color for KML line object
Default Value:
#000000ff
static Number DEFAULT_STROKE_WIDTH
Default stroke width for KML line object
Default Value:
1
String coordinates
Two or more coordinate tuples, each consisting of floating point values for longitude, latitude, and altitude. The altitude component is optional. Insert a space between tuples. Do not include spaces within a tuple.
Documentation generated on Thu Dec 15 2011 15:14:31 GMT+0100 (CET).