Class: KmlFile

KmlFile(url, controls)

Support for Kml File parsing and display.

Constructor

new KmlFile(url, controls)

Constructs an object for Kml file. Applications usually don't call this constructor. Parses associated KmlFile and allows user to draw the whole KmlFile in passed layer. The whole file is rendered in one Layer.
Parameters:
Name Type Description
url String Url of the remote document.
controls Array.<KmlControls> List of controls applied to this File.
Source:

Extends

Members

displayName :String

The display name of the renderable.
Type:
  • String
Inherited From:
Default Value:
  • "Renderable"
Source:

enabled :Boolean

Indicates whether to display this renderable.
Type:
  • Boolean
Inherited From:
Default Value:
  • true
Source:

(readonly) id :String

Every object, which is part of the KML document has its identity. We will use it for changes in the document for binding.
Type:
  • String
Inherited From:
Source:

(readonly) node :Node

Node of this object. It may be overridden by other users of some functions like parse.
Type:
  • Node
Inherited From:
Source:

pickDelegate :Object

Indicates the object to return as the userObject of this shape when picked. If null, then this shape is returned as the userObject.
Type:
  • Object
Inherited From:
Default Value:
  • null
Source:
See:

(readonly) shapes :Array.<KmlObject>

Contains shapes present in the document. Cache so that we don't need to parse the document every time it is passed through.
Type:
Source:

userProperties :Object

An application defined object associated with this renderable. A typical use case is to associate application defined data with a picked renderable.
Type:
  • Object
Inherited From:
Default Value:
  • An empty object
Source:

Methods

getExpired() → {Number}

This function returns expire time of this file in miliseconds.
Source:
Returns:
miliseconds for this file to expire.
Type
Number

getTagNames() → {Array.<String>}

Returns tag name of all descendants of abstract node or the tag name for current node.
Inherited From:
Source:
Returns:
Type
Array.<String>

hasExtension(url) → {boolean}

FOR INTERNAL USE ONLY. Returns a value indicating whether the URL ends with the given extension.
Parameters:
Name Type Description
url String Url to a file
Source:
Returns:
true if the extension matches otherwise false
Type
boolean

hook(controls, options)

It calls all controls associated with current KmlFile with the link to this.
Parameters:
Name Type Description
controls Array.<KmlControls> Controls associated with current tree.
options Object Options to pass into the controls.
Inherited From:
Source:

render(dc)

Render this renderable. Some shapes actually draw themselves during this call, others only add themselves to the draw context's ordered rendering list for subsequent drawing when their renderOrdered method is called. This method is intended to be called by layers such as RenderableLayer and not by applications.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Overrides:
Source:

requestRemote(url) → {Promise}

FOR INTERNAL USE ONLY. Based on the information from the URL, return correct Remote object.
Parameters:
Name Type Description
url String Url of the document to retrieve.
Source:
Returns:
Promise of Remote.
Type
Promise

resolveStyle(pId)

It finds the style in the document.
Parameters:
Name Type Description
pId String Id of the style.
Source: