GIScene.Layer.Grid Class
Constructor
GIScene.Layer.Grid
-
name -
[config]
Parameters:
-
nameStringthe layer name for display purposes
-
[config]Object optionalthe layer configuration object
Item Index
Methods
Methods
disposeStyle
-
style
Parameters:
-
styleGIScene.Style
getAttributeNames
()
Array(String)
Returns:
getNewTilesFromQuadtree
()
Array of GIScene.Grid.Index
computes the visible tiles of the current camera view
Returns:
newTiles
getObjectsBy
-
callback
Parameters:
-
callbackFunction
Returns:
getOutlineTiles
-
polygon
Parameters:
-
polygonArray of THREE.Vector3
loadTile
-
gridIndex
Loads a tile by specifiying a GIScene.Grid.Index
Parameters:
-
gridIndexGIScene.Grid.Index
loadTiles
-
tileArray
loads several tiles by specifying an array of GIScene.Grid.Index objects
Parameters:
-
tileArrayArray of GIScene.Grid.Index
removeStyle
-
style
Parameters:
-
styleGIScene.Style
removeTile
-
gridIndex
Removes a tile or aborts its loading by specifiying a GIScene.Grid.Index
Parameters:
-
gridIndexGIScene.Grid.Index
removeTiles
-
tileArray
removes or aborts the loading of several tiles by specifying an array of GIScene.Grid.Index objects
Parameters:
-
tileArrayArray of GIScene.Grid.Index
selectByAttributes
-
attributeName -
operator -
value -
selectMode
Parameters:
-
attributeNameStringmust be available in object.userData.gisceneAttributes -
operatorStringdefines how to compare the given values with the object attributes -
valueMixedthe values for the selection criteria -
selectModeStringcan be new,add,sub,intersect
Example:
{
"attributeName" : "attr_id",
"operator" : "IN", //"==","!=" .... TODO
"value" : [2393,1234],
"selectMode" : "new"
}
setMaxExtent
-
maxExtent2
set the max extent of the layer to restrict loading of tiles to a rectangle/bounding box
Parameters:
-
maxExtent2GIScene.Extent2a 2D bounding box in coordinate reference system (CRS) units
setOpacity
-
opacity
Parameters:
-
opacityNumber
setTerrainHeight
-
height
set an approximate terrain height at which the view frustrum will be cut horizontally to determine the visible tiles to be loaded
Parameters:
-
heightNumberthe terrain height in coordinate reference system (CRS) units (e.g. meters)
setVisibility
-
visibility
switches the visibility of the layer on or off
Parameters:
-
visibilityBoolean
startUpdate
()
Starts the automatic loading and removing of tiles dependant on the camera perspective
stopUpdate
()
Stops the automatic loading and removing of tiles dependent on the camera perspective
update
()
updates the current tiles, loads new tiles and removes old ones
Events
addStyle
afterSetOverrideMaterial
beforeSetOverrideMaterial
changedvisibility
listener function will get the following event object as argument
Example:
eventObject = {
content:{
layer:{GIScene.Layer},
visibility:{Boolean}
}
}
removeStyle
setActiveStyle
setScene
tileadd
Fires after a tile is added to the scene. A reference to the tile can be found at event.content.tile
tileload
Fires after a tile is loaded. A reference to the tile can be found at event.content.tile
tileremove
Fires after a tile is removed from the scene. A reference to the tile can be found at event.content.tile
