- Legend to Symbols

-
Class nokia.maps.kml.ObservableNode
This class is used as a mixin in nokia.maps.kml.Feature and nokia.maps.kml.Geometry, and for asynchronous parsing of the XML document containing KML data. Sometimes KML nodes can be very large (for example, a folder node may contain 2000 placemarks). Synchronous parsing of such nodes can cause the "Script running slow..." alert to appear. Thus, nodes that by their nature and according to the KML OGC specification cannot contain too many child nodes are parsed synchronously (those nodes are called "leaf" nodes, for example <Point> in KML). All other intermediate nodes starting from the <kml> tag in an XML document are parsed asynchronously.
During parsing, for each KML node supported by the Maps API, its
equivalent is created. For example, each Folder tag is found in a document, results in
an instance of the nokia.maps.kml.Folder class, which is derived from this class, thus
it has the ability to parse and create its child tags asynchronously. The parsing procedure starts by
calling the load() method. Each instance of this class has state, whose value at instantiation
is set to initial. When load() is called for a
"leaf" node, its state is set to ready. The state of the parent node is set to ready
when all its child nodes are ready. Thus, when the nokia.maps.kml.Document class
instance representing the <kml> tag from XML has the state "ready", the entire XML document
parsing has been completed.
The constructor initializes a new instance of the class using the arguments provided by the caller.
This class is used as a mixin in nokia.maps.kml.Feature and nokia.maps.kml.Geometry, and for asynchronous parsing of the XML document containing KML data. Sometimes KML nodes can be very large (for example, a folder node may contain 2000 placemarks). Synchronous parsing of such nodes can cause the "Script running slow..." alert to appear. Thus, nodes that by their nature and according to the KML OGC specification cannot contain too many child nodes are parsed synchronously (those nodes are called "leaf" nodes, for example <Point> in KML). All other intermediate nodes starting from the <kml> tag in an XML document are parsed asynchronously.
During parsing, for each KML node supported by the Maps API, its
equivalent is created. For example, each Folder tag is found in a document, results in
an instance of the nokia.maps.kml.Folder class, which is derived from this class, thus
it has the ability to parse and create its child tags asynchronously. The parsing procedure starts by
calling the load() method. Each instance of this class has state, whose value at instantiation
is set to initial. When load() is called for a
"leaf" node, its state is set to ready. The state of the parent node is set to ready
when all its child nodes are ready. Thus, when the nokia.maps.kml.Document class
instance representing the <kml> tag from XML has the state "ready", the entire XML document
parsing has been completed.
The constructor initializes a new instance of the class using the arguments provided by the caller.
| {Node} | node | An XML node from the KML document to parse |
| {Function} | onReadyCallback | A callback function which is called as soon as the node state is "ready" |
| {Node} | parentNode | Reference to the parent node |