Provides ways for transforming xml nodes to KML objects.
Methods
(static) attribute(name) → {function}
This transforming function works with attributes.
Parameters:
Name | Type | Description |
---|---|---|
name |
String | Name of the attribute to retrieve. |
Returns:
Transformer function.
- Type
- function
(static) boolean(node) → {Boolean}
Transforms node to its boolean value.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Node to transform |
Returns:
Boolean representation of node value.
- Type
- Boolean
(static) date(node) → {Date}
Transform node to the date
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Node to transform |
Returns:
Date representing current node.
- Type
- Date
(static) kmlObject(node, parent, controls) → {KmlObject|null}
This function retrieves relevant KmlObject to the Node. If there is such element it returns created element,
otherwise it returns null
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Node to transform |
parent |
KmlObject | Parent to current node. |
controls |
Array | Array of controls. |
Returns:
KmlObject representation for the node.
- Type
- KmlObject | null
(static) linearRing(node, parent, controls) → {KmlLinearRing}
It takes the node and transforms it to the LinearRing this was created to solve the mismatch between name of the
element and type of the element.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Node to transform |
parent |
KmlObject | Parent to current node. |
controls |
Array | Array of controls. |
Returns:
Transformed Linear Ring.
- Type
- KmlLinearRing
(static) number(node) → {Number}
Transforms node to its Numeric value.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Node to transform |
Returns:
Numeric representation of node value.
- Type
- Number
(static) positions(node) → {Array.<Position>}
It takes the node and returns al positions included in it.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Node to transform |
Returns:
All included positions. Positions are separated by space.
- Type
- Array.<Position>
(static) string(node) → {String}
Transforms node to its String value.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | Node to transform |
Returns:
Text representation of node value.
- Type
- String