createLayer Method

Creates a new layer from a FLY or KML file.

createLayer(layerURL, [layerName]);

 

Parameter

Description

layerURL

The layer URL

layerName

Optional

The layer name

Return Value

An SGNode object.

Remarks

To modify other properties of the layer, access the node innerObj. See SGNode.innerObj property for more details.

Example

The following example illustrates the use of the createLayer method.

 

function createLayer()

{

   var layer = globe.creator.createLayer( "http://www.skylineglobe.com/SkylineOnline/Layers/Park_180107.FLY","Lakes");

   globe.root.appendChild(layer);

}