GoogleMap3DTileLayer

A layer that displays google maps 3DTiles. Note that the regular OGC3DTilesLayer can be used but this layer handles default settings specific to google maps 3D tiles

Constructor

new GoogleMap3DTileLayer(properties)

Parameters:
NameTypeDescription
propertiesObjectthe properties for this tileset
Properties
NameTypeAttributesDefaultDescription
apiKeyStringthe google map API key
idObjectthe layer id
nameStringa name for the layer.
displayCopyrightBoolean<optional>
true(optional) display copyright information when present in tiles by concatenating all copyright info for all displayed tiles
displayErrorsBoolean<optional>
false(optional) display loading errors
geometricErrorMultiplierNumber<optional>
1(optional) between 0 and infinity, defaults to 1 on desktop and 0.3 on mobile devices. controls the level of detail.
loadOutsideViewBoolean<optional>
false(optional) if true, will load tiles outside the view at the lowest possible LOD.
boundsArray.<Number><optional>
[-180, -90, 180, 90]min longitude, min latitude, max longitude, max latitude in degrees
visibleBoolean<optional>
truelayer will be rendered if true (true by default)
loadingStrategyString<optional>
"INCREMENTAL"loading strategy, "INCREMENTAL" (default) or "IMMEDIATE". "IMMEDIATE" mode loads only the ideal LOD while "INCREMENTAL" loads intermediate LODs.
updateCallbackfunction<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

Extends

Methods

addListener(key, listener)

Adds a listener for layer events
Parameters:
NameTypeDescription
key*can be anything but should be unique
listenerfunctiona function : (layer, eventType)=>{}

dispose()

disposes of any resources used by this layer

getBounds() → {THREE.Box2}

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:
NameTypeDescription
sfctTHREE.Vector3a point to move
Returns:
the input point
Type: 
THREE.Vector3

getID()

Returns:
layer id

getName()

Returns:
layer name

getSelectableObjects()

Get all the selectable objects of this layer.
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:
NameTypeAttributesDefaultDescription
longitudenumber<optional>
0a longitude in degrees
latitudenumber<optional>
0a latitude in degrees
heightnumber<optional>
0a height in meters above WGS 84 sea level
yawnumber<optional>
0Yaw angle in degrees. (0 points north ccw rotation)
pitchnumber<optional>
0Pitch angle in degrees (-90 to 90)
rollnumber<optional>
0Roll angle in degrees.
scaleXnumber<optional>
1scale on X axes.
scaleYnumber<optional>
1scale on Y axes. defaults to the scaleX property if defined.
scaleZnumber<optional>
1scale on Z axes. defaults to the scaleX property if defined.

removeListener(key)

Removes the listener associated to the given key
Parameters:
NameTypeDescription
key*can be anything but should be unique

select(objectsToSelect) → {Boolean}

selects an object from this layer
Parameters:
NameTypeDescription
objectsToSelectObject
Returns:
true if the object was selected, false otherwise
Type: 
Boolean

setName(name)

change the layer name
Parameters:
NameTypeDescription
nameString

setVisible(visible)

Modifies the layer visibility
Parameters:
NameTypeDescription
visibleBoolean

unselect(objectsToUnselect) → {Boolean}

un-selects an object from this layer
Parameters:
NameTypeDescription
objectsToUnselectObject
Returns:
true if the object was un-selected, false otherwise
Type: 
Boolean