API Docs for: 1.0.2
Show:

GIScene.Layer.Fixed Class

Extends GIScene.Layer
Module: GIScene

It doesn't care about BoundingBoxes, Frustums, LODs or geographic grids.

Constructor

GIScene.Layer.Fixed

(
  • name
  • [config]
)

Parameters:

  • name String

    the layer name for display purposes

  • [config] Object optional

    the layer configuration object

Example:

var onload = function(event){// do something when model is loaded};
var layerconfig = {
    url: "./path/myModel.json",
    format: GIScene.Format.JSON,
    verticalAxis : "Z",
    listeners:[{'load':onload}]
};
var layer = new GIScene.Layer.Fixed("My Layer", layerconfig);
scene.addLayer(layer);

Methods

addStyle

(
  • style
)
add a style to the layers styles list

Parameters:

disposeStyle

(
  • style
)
remove style, its material and textures from memory

Parameters:

getAttributeNames

() Array(String)

Returns:

Array(String): attributeNames

getObjectsBy

(
  • callback
)
Array
get Objects by a evaluation function which recursively tries to match the objects of the layer

Parameters:

  • callback Function

Returns:

Array: matches

removeStyle

(
  • style
)
remove an existing style from the layers style list

Parameters:

selectByAttributes

(
  • attributeName
  • operator
  • value
  • selectMode
)
set or modify the current layer selection by attribute query

Parameters:

  • attributeName String
    must be available in object.userData.gisceneAttributes
  • operator String
    defines how to compare the given values with the object attributes
  • value Mixed
    the values for the selection criteria
  • selectMode String
    can be new,add,sub,intersect

Example:

{
    "attributeName" : "attr_id",
    "operator"      : "IN", //"==","!=" .... TODO
    "value"         : [2393,1234],
    "selectMode"    : "new"
}

setActiveStyle

(
  • style
)
apply a style to the layer

Parameters:

setOpacity

(
  • opacity
)
Sets the opacity value for the whole layer

Parameters:

  • opacity Number

Events

addStyle

afterSetOverrideMaterial

beforeSetOverrideMaterial

changedvisibility listener function will get the following event object as argument

Example:

eventObject = {
                        content:{
                            layer:{GIScene.Layer}, 
                            visibility:{Boolean}
                        }
                    }           

load

Fires after layer is loaded. event.content holds a reference to the layer

removeStyle

setActiveStyle

setScene