GIScene.Layer.W3DS_0_4_1 Class
Tiled multi LOD grid layer using the W3DS v0.4.1 OGC Discussion Paper Specification to load georeferenced 3D data inherits from GIScene.Layer.Grid
Constructor
GIScene.Layer.W3DS_0_4_1
(
-
name
-
[config]
Parameters:
-
name
Stringthe layer name
-
[config]
Object optionala configuration object
Example:
var layerconfig = {
url:"http://www.example.org/w3ds",
// withCredentials:true,
layer:"DEM",
crs:"EPSG:32616",
origin:new GIScene.Coordinate2(264495.0,1639108.0),
offset:new GIScene.Coordinate3(264495.0,1639108.0,600), //w3ds GetScene offset param from this
tileSizes:[1024,512,256,128],
terrainHeight:600,
maxExtent: new GIScene.Extent2(new GIScene.Coordinate2(264495.0, 1639108.0), new GIScene.Coordinate2(274495.0, 1649108.0)),
maxDistance: 10000,
lodDistanceFactor :1.5,
format:GIScene.Format.Scene,
overrideMaterial : wmsOverlayMaterial,
overrideMaterialHandler : GIScene.OverrideMaterialHandler.WMS //only together with GIScene.WMSOverlayMaterial
// overrideMaterial : new THREE.MeshBasicMaterial({wireframe:true})
};
var layer = new GIScene.Layer.W3DS_0_4_1("w3ds",layerconfig);
scene.addLayer(layer);
Item Index
Methods
Methods
disposeStyle
(
-
style
remove style, its material and textures from memory
Parameters:
-
style
GIScene.Style
getAttributeNames
()
Array(String)
Returns:
Array(String):
attributeNames
getNewTilesFromQuadtree
()
Array of GIScene.Grid.Index
computes the visible tiles of the current camera view
Returns:
Array of GIScene.Grid.Index:
newTiles
getObjectsBy
(
Array
-
callback
get Objects by a evaluation function which recursively tries to match the objects of the layer
Parameters:
-
callback
Function
Returns:
Array:
matches
getOutlineTiles
(
private
-
polygon
Parameters:
-
polygon
Array of THREE.Vector3
loadTile
(
-
gridIndex
Loads a tile by specifiying a GIScene.Grid.Index
Parameters:
-
gridIndex
GIScene.Grid.Index
loadTiles
(
-
tileArray
loads several tiles by specifying an array of GIScene.Grid.Index objects
Parameters:
-
tileArray
Array of GIScene.Grid.Index
removeStyle
(
-
style
remove an existing style from the layers style list
Parameters:
-
style
GIScene.Style
removeTile
(
-
gridIndex
Removes a tile or aborts its loading by specifiying a GIScene.Grid.Index
Parameters:
-
gridIndex
GIScene.Grid.Index
removeTiles
(
-
tileArray
removes or aborts the loading of several tiles by specifying an array of GIScene.Grid.Index objects
Parameters:
-
tileArray
Array of GIScene.Grid.Index
selectByAttributes
(
-
attributeName
-
operator
-
value
-
selectMode
set or modify the current layer selection by attribute query
Parameters:
-
attributeName
Stringmust be available in object.userData.gisceneAttributes -
operator
Stringdefines how to compare the given values with the object attributes -
value
Mixedthe values for the selection criteria -
selectMode
Stringcan 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:
-
maxExtent2
GIScene.Extent2a 2D bounding box in coordinate reference system (CRS) units
setOpacity
(
-
opacity
Sets the opacity value for the whole layer
Parameters:
-
opacity
Number
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:
-
height
Numberthe terrain height in coordinate reference system (CRS) units (e.g. meters)
setVisibility
(
-
visibility
switches the visibility of the layer on or off
Parameters:
-
visibility
Boolean
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