Constructor
new OGC3DTilesLayer(properties, scaleXopt, scaleYopt, scaleZopt, yawopt, pitchopt, rollopt)
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
properties | Object | Properties
| ||||||||||||||||||||||||||||||||||||||||||
scaleX | number | <optional> | 1 | scale on X axes. | ||||||||||||||||||||||||||||||||||||||||
scaleY | number | <optional> | 1 | scale on Y axes. defaults to the scaleX property if defined. | ||||||||||||||||||||||||||||||||||||||||
scaleZ | number | <optional> | 1 | scale on Z axes. defaults to the scaleX property if defined. | ||||||||||||||||||||||||||||||||||||||||
yaw | number | <optional> | 0 | Yaw angle in degrees. (0 means local z axis points north ccw rotation) | ||||||||||||||||||||||||||||||||||||||||
pitch | number | <optional> | 0 | Pitch angle in degrees (0 means the x-z plane alligns with the horizon ) | ||||||||||||||||||||||||||||||||||||||||
roll | number | <optional> | 0 | Roll angle in degrees. (ccw rotation about the local z axis) | ||||||||||||||||||||||||||||||||||||||||
properties.geometricErrorMultiplier | Number | <optional> | 1 | (optional) between 0 and infinity, defaults to 1. controls the level of detail. | ||||||||||||||||||||||||||||||||||||||||
properties.longitude | Number | <optional> | 0 | (optional) longitude of the model's center point in degrees. | ||||||||||||||||||||||||||||||||||||||||
properties.latitude | Number | <optional> | 0 | (optional) latitude of the model's center point in degrees. | ||||||||||||||||||||||||||||||||||||||||
properties.height | Number | <optional> | 0 | (optional) height in meters above sea level. | ||||||||||||||||||||||||||||||||||||||||
properties.loadOutsideView | Boolean | <optional> | false | (optional) if true, will load tiles outside the view at the lowest possible LOD. | ||||||||||||||||||||||||||||||||||||||||
properties.selectable | Boolean | <optional> | false | (optional) if true, the tileset can be selected. | ||||||||||||||||||||||||||||||||||||||||
properties.bounds | Array.<Number> | <optional> | [-180, -90, 180, 90] | min longitude, min latitude, max longitude, max latitude in degrees | ||||||||||||||||||||||||||||||||||||||||
properties.visible | Boolean | <optional> | true | layer will be rendered if true (true by default) | ||||||||||||||||||||||||||||||||||||||||
properties.loadingStrategy | String | <optional> | "INCREMENTAL" | loading strategy, "INCREMENTAL" (default) or "IMMEDIATE". "IMMEDIATE" mode loads only the ideal LOD while "INCREMENTAL" loads intermediate LODs. | ||||||||||||||||||||||||||||||||||||||||
properties.updateCallback | function | <optional> | A callback called on every tileset update with a stats object indicating number of tiles loaded/visualized, max loaded LOD, and percentage of the tileset loaded |
- Source
Extends
Methods
addListener(key, listener)
Adds a listener for layer events
Parameters:
Name | Type | Description |
---|---|---|
key | * | can be anything but should be unique |
listener | function | a function : (layer, eventType)=>{} |
- Overrides
- Source
dispose()
disposes of any resources used by this layer
- Overrides
- Source
getBounds() → {THREE.Box2}
- Overrides
- Source
Returns:
bounds in longitude latitude (degrees)
- Type:
- THREE.
Box2
getCenter(sfct) → {THREE.Vector3}
Moves a given point to this layer's center in degree longitude/latitude
Parameters:
Name | Type | Description |
---|---|---|
sfct | THREE. | a point to move |
- Overrides
- Source
Returns:
the input point
- Type:
- THREE.
Vector3
getID()
- Overrides
- Source
Returns:
layer id
getName()
- Overrides
- Source
Returns:
layer name
getSelectableObjects()
Get all the selectable objects of this layer.
- Overrides
- Source
Returns:
an array of ray-castable objects with a property "layer" pointing to this layer.
move(longitudeopt, latitudeopt, heightopt, yawopt, pitchopt, rollopt, scaleXopt, scaleYopt, scaleZopt)
Sets the object position and orientation based on Longitude, Latitude, Height, Yaw, Pitch, Roll
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
longitude | number | <optional> | 0 | a longitude in degrees |
latitude | number | <optional> | 0 | a latitude in degrees |
height | number | <optional> | 0 | a height in meters above WGS 84 sea level |
yaw | number | <optional> | 0 | Yaw angle in degrees. (0 points north ccw rotation) |
pitch | number | <optional> | 0 | Pitch angle in degrees (-90 to 90) |
roll | number | <optional> | 0 | Roll angle in degrees. |
scaleX | number | <optional> | 1 | scale on X axes. |
scaleY | number | <optional> | 1 | scale on Y axes. defaults to the scaleX property if defined. |
scaleZ | number | <optional> | 1 | scale on Z axes. defaults to the scaleX property if defined. |
removeListener(key)
Removes the listener associated to the given key
Parameters:
Name | Type | Description |
---|---|---|
key | * | can be anything but should be unique |
- Overrides
- Source
select(objectsToSelect) → {Boolean}
selects an object from this layer
Parameters:
Name | Type | Description |
---|---|---|
objectsToSelect | Object |
- Overrides
- Source
Returns:
true if the object was selected, false otherwise
- Type:
- Boolean
setName(name)
change the layer name
Parameters:
Name | Type | Description |
---|---|---|
name | String |
- Overrides
- Source
setVisible(visible)
Modifies the layer visibility
Parameters:
Name | Type | Description |
---|---|---|
visible | Boolean |
- Overrides
- Source
unselect(objectsToUnselect) → {Boolean}
un-selects an object from this layer
Parameters:
Name | Type | Description |
---|---|---|
objectsToUnselect | Object |
- Overrides
- Source
Returns:
true if the object was un-selected, false otherwise
- Type:
- Boolean