Home Reference Source Repository

Function

Static Public Summary
public
public

BasicMaterial(color: *)

public
public

BuildingBox_Provider(options: *)

public
public

Camera(width: *, height: *)

public

Custom error thrown when cancelling commands.

public

Clouds()

public

Coordinates(crs: string, coordinates: number | THREE.Vector3)

Build a Coordinates object, given a {@link http://inspire.ec.europa.eu/theme/rs|crs} and a number of coordinates value.

public

Ellipsoid(size: *)

public

Extent(crs: *, values: ...*)

public
public

GlobeControls(view: *, target: *, domElement: *, viewerDiv: *, radius: *, getPickingPosition: *)

public

Creates the viewer Globe (the globe of iTowns).

public

Generated On: 2015-10-5 Class: IoDriver Description: Cette classe générique parcourt un fichier et retourne un object.

public
public

ItownsLine(options: *)

public

ItownsLineMaterial(options: *)

public

ItownsPoint(options: *)

public

ItownsPointMaterial(options: *)

public

KML_Provider(ellipsoid: *)

public
public

LayerUpdateState is the update state of a layer, for a given object (e.g tile).

public

LayeredMaterial(options: *)

public

MainLoop(scheduler: *, engine: *)

public

MatteIdsMaterial(otherMaterial: *)

public

OBB(min: *, max: *, lookAt: *, translate: *)

public

PanoramicMesh(geom: *, mat: *, absC: *)

public
public

PlanarView(viewerDiv: *, boundingbox: *, options: *)

public

Point2D(x: *, y: *)

public
public

Provider(iodriver: *)

Generated On: 2015-10-5 Class: Provider Description: Generic class to serve data, local or distant, nodes and services.

public

Rectangle(options: *)

Generated On: 2015-10-5 Class: Rectangle

public
public

Generated On: 2015-10-5 Class: SchemeTile Description: Cette classe décrit un découpage spatiale.

public

Sky()

public

Sphere(center: *, radius: *)

public

SphereHelper(radius: *)

public
public

TileDepthMaterial(otherMaterial: *)

public

TileGeometry(params: *, builder: *)

public

TileMesh(geometry: *, params: *)

public
public

View(crs: string, viewerDiv: DOMElement, options: boolean, glDebug: boolean)

Constructs an Itowns Scene instance

public

Return url wmts MNT

public

Return url wmts MNT

public
public
public

c3DEngine(viewerDiv: *)

public

chooseNextLevelToFetch(strategy: *, nodeLevel: *, currentLevel: *, options: *): *

public
public
public

convertValueToUnit(unitIn: *, unitOut: *, value: *): *

public

crsIsGeocentric(crs: *): *

public

crsIsGeographic(crs: *): *

public

crsToUnit(crs: *): *

public

defineLayerProperty(layer: *, propertyName: *, defaultValue: *, onChange: *)

public

ellipsoidSizes(): {"x": number, "y": number, "z": number}

public

globeCulling(minLevelForHorizonCulling: *): *

public

globeSchemeTileWMTS(type: *): *

public

globeSubdivisionControl(minLevel: *, maxLevel: *, sseThreshold: *): *

public

initTiledGeometryLayer(schemeTile: *): *

public

loadGpx(urlFile: *): *

public

planarCulling(node: *, camera: *): *

public

planarSchemeTile(bbox: *): *

public

planarSubdivisionControl(maxLevel: *, threshold: *): *

public

preGlobeUpdate(context: *)

public

processTiledGeometryNode(cullingTest: *, subdivisionTest: *, initNewNode: *): *

public
public

unpack1K(color: *, factor: *): *

public

updateLayeredMaterialNodeElevation(context: *, layer: *, node: *, force: *): *

public

updateLayeredMaterialNodeImagery(context: *, layer: *, node: *): *

Static Protected Summary
protected

Layer(id: String)

Static Public

public Atmosphere() source

public BasicMaterial(color: *) source

import BasicMaterial from 'itowns/src/Renderer/BasicMaterial.js'

Params:

NameTypeAttributeDescription
color *

public BuilderEllipsoidTile() source

import BuilderEllipsoidTile from 'itowns/src/Core/Prefab/Globe/BuilderEllipsoidTile.js'

public BuildingBox_Provider(options: *) source

Params:

NameTypeAttributeDescription
options *

public CacheRessource(): * source

Return:

*

public Camera(width: *, height: *) source

import Camera from 'itowns/src/Renderer/Camera.js'

Params:

NameTypeAttributeDescription
width *
height *

public CancelledCommandException(command: *) source

import {CancelledCommandException} from 'itowns/src/Core/Scheduler/Scheduler.js'

Custom error thrown when cancelling commands. Allows the caller to act differently if needed.

Params:

NameTypeAttributeDescription
command *

public Clouds() source

public Coordinates(crs: string, coordinates: number | THREE.Vector3) source

Build a Coordinates object, given a {@link http://inspire.ec.europa.eu/theme/rs|crs} and a number of coordinates value. Coordinates can be in geocentric system, geographic system or an instance of {@link https://threejs.org/docs/#api/math/Vector3|THREE.Vector3}. If crs = 'EPSG:4326', coordinates must be in geographic system. If crs = 'EPSG:4978', coordinates must be in geocentric system.

Params:

NameTypeAttributeDescription
crs string

Geographic or Geocentric coordinates system.

coordinates number | THREE.Vector3

The globe coordinates to aim to.

coordinates.longitude number

Geographic Coordinate longitude

coordinates.latitude number

Geographic Coordinate latitude

coordinates.altitude number

Geographic Coordinate altiude

coordinates.x number

Geocentric Coordinate X

coordinates.y number

Geocentric Coordinate Y

coordinates.z number

Geocentric Coordinate Z

Example:

new Coordinates('EPSG:4978', 20885167, 849862, 23385912); //Geocentric coordinates
// or
new Coordinates('EPSG:4326', 2.33, 48.24, 24999549); //Geographic coordinates

public Ellipsoid(size: *) source

import Ellipsoid from 'itowns/src/Core/Math/Ellipsoid.js'

Params:

NameTypeAttributeDescription
size *

public Extent(crs: *, values: ...*) source

Params:

NameTypeAttributeDescription
crs *
values ...*

public GeometryLayer(i: *) source

import {GeometryLayer} from 'itowns/src/Core/Layer/Layer.js'

Params:

NameTypeAttributeDescription
i *

public GlobeControls(view: *, target: *, domElement: *, viewerDiv: *, radius: *, getPickingPosition: *) source

Params:

NameTypeAttributeDescription
view *
target *
domElement *
viewerDiv *
radius *
getPickingPosition *

public GlobeView() source

import GlobeView from 'itowns/src/Core/Prefab/GlobeView.js'

Creates the viewer Globe (the globe of iTowns). The first parameter is the coordinates on wich the globe will be centered at the initialization. The second one is the HTML div in wich the scene will be created.

Params:

NameTypeAttributeDescription
coords. Coords

Example:

view = new GlobeView(viewer, positionOnGlobe);
// positionOnGlobe in latitude, longitude and altitude

public IoDriver() source

Generated On: 2015-10-5 Class: IoDriver Description: Cette classe générique parcourt un fichier et retourne un object.

public IoDriver_XBIL() source

public ItownsLine(options: *) source

Params:

NameTypeAttributeDescription
options *

public ItownsLineMaterial(options: *) source

import ItownsLineMaterial from 'itowns/src/Renderer/ItownsLineMaterial.js'

Params:

NameTypeAttributeDescription
options *

public ItownsPoint(options: *) source

Params:

NameTypeAttributeDescription
options *

public ItownsPointMaterial(options: *) source

import ItownsPointMaterial from 'itowns/src/Renderer/ItownsPointMaterial.js'

Params:

NameTypeAttributeDescription
options *

public KML_Provider(ellipsoid: *) source

Params:

NameTypeAttributeDescription
ellipsoid *

public KMZLoader() source

public LayerUpdateState() source

import LayerUpdateState from 'itowns/src/Core/Layer/LayerUpdateState.js'

LayerUpdateState is the update state of a layer, for a given object (e.g tile). It stores information to allow smart update decisions, and especially network error handling.

public LayeredMaterial(options: *) source

import LayeredMaterial from 'itowns/src/Renderer/LayeredMaterial.js'

Params:

NameTypeAttributeDescription
options *

public MainLoop(scheduler: *, engine: *) source

import MainLoop from 'itowns/src/Core/MainLoop.js'

Params:

NameTypeAttributeDescription
scheduler *
engine *

public MatteIdsMaterial(otherMaterial: *) source

import MatteIdsMaterial from 'itowns/src/Renderer/MatteIdsMaterial.js'

Params:

NameTypeAttributeDescription
otherMaterial *

public OBB(min: *, max: *, lookAt: *, translate: *) source

Params:

NameTypeAttributeDescription
min *
max *
lookAt *
translate *

public PanoramicMesh(geom: *, mat: *, absC: *) source

import PanoramicMesh from 'itowns/src/Renderer/PanoramicMesh.js'

Params:

NameTypeAttributeDescription
geom *
mat *
absC *

public PlanarTileBuilder() source

public PlanarView(viewerDiv: *, boundingbox: *, options: *) source

import PlanarView from 'itowns/src/Core/Prefab/PlanarView.js'

Params:

NameTypeAttributeDescription
viewerDiv *
boundingbox *
options *

public Point2D(x: *, y: *) source

import Point2D from 'itowns/src/Core/Math/Point2D.js'

Params:

NameTypeAttributeDescription
x *
y *

public Projection() source

public Provider(iodriver: *) source

Generated On: 2015-10-5 Class: Provider Description: Generic class to serve data, local or distant, nodes and services.

Params:

NameTypeAttributeDescription
iodriver *

public Rectangle(options: *) source

import Rectangle from 'itowns/src/Core/Math/Rectangle.js'

Generated On: 2015-10-5 Class: Rectangle

Params:

NameTypeAttributeDescription
options *

public Scheduler() source

public SchemeTile() source

Generated On: 2015-10-5 Class: SchemeTile Description: Cette classe décrit un découpage spatiale.

public Sky() source

public Sphere(center: *, radius: *) source

import Sphere from 'itowns/src/Core/Math/Sphere.js'

Params:

NameTypeAttributeDescription
center *
radius *

public SphereHelper(radius: *) source

Params:

NameTypeAttributeDescription
radius *

public StarGeometry() source

public TileDepthMaterial(otherMaterial: *) source

import TileDepthMaterial from 'itowns/src/Renderer/TileDepthMaterial.js'

Params:

NameTypeAttributeDescription
otherMaterial *

public TileGeometry(params: *, builder: *) source

import TileGeometry from 'itowns/src/Core/TileGeometry.js'

Params:

NameTypeAttributeDescription
params *
builder *

public TileMesh(geometry: *, params: *) source

import TileMesh from 'itowns/src/Core/TileMesh.js'

Params:

NameTypeAttributeDescription
geometry *
params *

public TileProvider() source

public View(crs: string, viewerDiv: DOMElement, options: boolean, glDebug: boolean) source

import View from 'itowns/src/Core/View.js'

Constructs an Itowns Scene instance

Params:

NameTypeAttributeDescription
crs string

The default CRS of Three.js coordinates. Should be a cartesian CRS.

viewerDiv DOMElement

Where to instanciate the Three.js scene in the DOM

options boolean

Optional properties. May contain:

  • mainLoop: {MainLoop} instance to use, otherwise a default one will be constructed
  • renderer: {WebGLRenderer} instance to use, otherwise a default one will be constructed. If not present, a new <canvas> will be created and added to viewerDiv (mutually exclusive with mainLoop)
  • scene3D: {Scene} instance to use, otherwise a default one will be constructed
glDebug boolean

debug gl code

Example:

// How add gpx object
itowns.loadGpx(url).then((gpx) => {
     if (gpx) {
        viewer.scene.add(gpx);
     }
});

viewer.notifyChange(0, true);

public WFS_Provider(): * source

Return url wmts MNT

Params:

NameTypeAttributeDescription
options.url: String

service base url

options.layer: String

requested data layer

options.format: String

image format (default: format/jpeg)

Return:

*

{Object@call;create.url.url|String}

public WMS_Provider(): * source

Return url wmts MNT

Params:

NameTypeAttributeDescription
options.url: String

service base url

options.layer: String

requested data layer

options.format: String

image format (default: format/jpeg)

Return:

*

{Object@call;create.url.url|String}

public WMTS_Provider() source

public assertCrsIsValid(crs: *) source

import {assertCrsIsValid} from 'itowns/src/Core/Geographic/Coordinates.js'

Params:

NameTypeAttributeDescription
crs *

public c3DEngine(viewerDiv: *) source

import c3DEngine from 'itowns/src/Renderer/c3DEngine.js'

Params:

NameTypeAttributeDescription
viewerDiv *

public chooseNextLevelToFetch(strategy: *, nodeLevel: *, currentLevel: *, options: *): * source

import {chooseNextLevelToFetch} from 'itowns/src/Core/Layer/LayerUpdateStrategy.js'

Params:

NameTypeAttributeDescription
strategy *
nodeLevel *
currentLevel *
options *

Return:

*

public computeDistanceCameraFromTileZoom(zoom: *): * source

import {computeDistanceCameraFromTileZoom} from 'itowns/src/Process/GlobeTileProcessing.js'

Params:

NameTypeAttributeDescription
zoom *

Return:

*

public computeTileZoomFromDistanceCamera(distance: *): * source

import {computeTileZoomFromDistanceCamera} from 'itowns/src/Process/GlobeTileProcessing.js'

Params:

NameTypeAttributeDescription
distance *

Return:

*

public convertValueToUnit(unitIn: *, unitOut: *, value: *): * source

import {convertValueToUnit} from 'itowns/src/Core/Geographic/Coordinates.js'

Params:

NameTypeAttributeDescription
unitIn *
unitOut *
value *

Return:

*

public crsIsGeocentric(crs: *): * source

import {crsIsGeocentric} from 'itowns/src/Core/Geographic/Coordinates.js'

Params:

NameTypeAttributeDescription
crs *

Return:

*

public crsIsGeographic(crs: *): * source

import {crsIsGeographic} from 'itowns/src/Core/Geographic/Coordinates.js'

Params:

NameTypeAttributeDescription
crs *

Return:

*

public crsToUnit(crs: *): * source

Params:

NameTypeAttributeDescription
crs *

Return:

*

public defineLayerProperty(layer: *, propertyName: *, defaultValue: *, onChange: *) source

import {defineLayerProperty} from 'itowns/src/Core/Layer/Layer.js'

Params:

NameTypeAttributeDescription
layer *
propertyName *
defaultValue *
onChange *

public ellipsoidSizes(): {"x": number, "y": number, "z": number} source

import {ellipsoidSizes} from 'itowns/src/Core/Geographic/Coordinates.js'

Return:

{"x": number, "y": number, "z": number}

public globeCulling(minLevelForHorizonCulling: *): * source

import {globeCulling} from 'itowns/src/Process/GlobeTileProcessing.js'

Params:

NameTypeAttributeDescription
minLevelForHorizonCulling *

Return:

*

public globeSchemeTileWMTS(type: *): * source

import {globeSchemeTileWMTS} from 'itowns/src/Process/GlobeTileProcessing.js'

Params:

NameTypeAttributeDescription
type *

Return:

*

public globeSubdivisionControl(minLevel: *, maxLevel: *, sseThreshold: *): * source

import {globeSubdivisionControl} from 'itowns/src/Process/GlobeTileProcessing.js'

Params:

NameTypeAttributeDescription
minLevel *
maxLevel *
sseThreshold *

Return:

*

public initTiledGeometryLayer(schemeTile: *): * source

import {initTiledGeometryLayer} from 'itowns/src/Process/TiledNodeProcessing.js'

Params:

NameTypeAttributeDescription
schemeTile *

Return:

*

public loadGpx(urlFile: *): * source

Params:

NameTypeAttributeDescription
urlFile *

Return:

*

public planarCulling(node: *, camera: *): * source

import {planarCulling} from 'itowns/src/Process/PlanarTileProcessing.js'

Params:

NameTypeAttributeDescription
node *
camera *

Return:

*

public planarSchemeTile(bbox: *): * source

import {planarSchemeTile} from 'itowns/src/Process/PlanarTileProcessing.js'

Params:

NameTypeAttributeDescription
bbox *

Return:

*

public planarSubdivisionControl(maxLevel: *, threshold: *): * source

import {planarSubdivisionControl} from 'itowns/src/Process/PlanarTileProcessing.js'

Params:

NameTypeAttributeDescription
maxLevel *
threshold *

Return:

*

public preGlobeUpdate(context: *) source

import {preGlobeUpdate} from 'itowns/src/Process/GlobeTileProcessing.js'

Params:

NameTypeAttributeDescription
context *

public processTiledGeometryNode(cullingTest: *, subdivisionTest: *, initNewNode: *): * source

import {processTiledGeometryNode} from 'itowns/src/Process/TiledNodeProcessing.js'

Params:

NameTypeAttributeDescription
cullingTest *
subdivisionTest *
initNewNode *

Return:

*

public reasonnableEpsilonForUnit(unit: *): number source

import {reasonnableEpsilonForUnit} from 'itowns/src/Core/Geographic/Coordinates.js'

Params:

NameTypeAttributeDescription
unit *

Return:

number

public unpack1K(color: *, factor: *): * source

Params:

NameTypeAttributeDescription
color *
factor *

Return:

*

public updateLayeredMaterialNodeElevation(context: *, layer: *, node: *, force: *): * source

import {updateLayeredMaterialNodeElevation} from 'itowns/src/Process/LayeredMaterialNodeProcessing.js'

Params:

NameTypeAttributeDescription
context *
layer *
node *
force *

Return:

*

public updateLayeredMaterialNodeImagery(context: *, layer: *, node: *): * source

import {updateLayeredMaterialNodeImagery} from 'itowns/src/Process/LayeredMaterialNodeProcessing.js'

Params:

NameTypeAttributeDescription
context *
layer *
node *

Return:

*

Static Protected

protected Layer(id: String) source

import {Layer} from 'itowns/src/Core/Layer/Layer.js'

Params:

NameTypeAttributeDescription
id String

Example:

// add and create a new Layer
const newLayer = view.addLayer({options});

// Change layer's visibilty
const layerToChange = view.getLayers(layer => layer.id == 'idLayerToChange')[0];
layerToChange.visible = false;
view.notifyChange(0,true); // update viewer

// Change layer's opacity
const layerToChange = view.getLayers(layer => layer.id == 'idLayerToChange')[0];
layerToChange.opacity = 0.5;
view.notifyChange(0,true); // update viewer

// Listen properties
const layerToListen = view.getLayers(layer => layer.id == 'idLayerToListen')[0];
layerToListen.addEventListener('visible-property-changed', (event) => console.log(event));
layerToListen.addEventListener('opacity-property-changed', (event) => console.log(event));