SingleImageImageryLayer

Imagery from a single image (Equidistant Cylindrical only).

Constructor

new SingleImageImageryLayer(properties)

Create a layer that requests images from a WMS service. The layer will immediately return the closest available LOD and load a better LOD for the tile when requestable Only EPSG:4326 is supported.
Parameters:
NameTypeDescription
propertiesObject
Properties
NameTypeAttributesDefaultDescription
idString | Numberlayer id should be unique
nameStringthe name can be anything you want and is intended for labeling
urlStringthe image url
epsgStringan EPSG code (only epsg:4326 supported)
transparencyNumber<optional>
0the layer's transparency (0 to 1)
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)

Extends

Methods

_getMap(tile, callbackSuccess, callbackFailure) → {Object}

Fetches the nearest loaded LOD (texture, uvBounds and reference) and adds a callback for the ideal LOD if not yet available
Parameters:
NameTypeDescription
tilePlanetTilethe requestor
callbackSuccessfunctionthe callback to be called when correct LOD is available with an object containing texture and uvBounds
callbackFailurefunctioncalled on exception
Returns:
the nearest already loaded LOD texture and uv bounds for the requestor: {texture: THREE.Texture, uvBounds:THREE.Box2, reference:String}
Type: 
Object

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.

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