Class: CesiumView

CesiumView(propertiesopt)

This class is in charge of displaying GPS/orientation data by adding a marker to the Cesium object.

Constructor

new CesiumView(propertiesopt)

Create a View.
Parameters:
Name Type Attributes Default Description
properties Object <optional>
{} the properties of the view
Properties
Name Type Attributes Default Description
container String The div element to attach to
layers Array.<Object> <optional>
[] The initial layers to add
autoZoomOnFirstMarker Boolean <optional>
false auto zoom on the first added marker
options Object <optional>
{} Properties which can override the default framework ones
Properties
Name Type Attributes Default Description
viewer Object <optional>
the Viewer object to pass Cesium Viewer object
viewerProps Object <optional>
{} the properties of the Cesium Viewer object
location Object <optional>
the default location to set
Properties
Name Type Description
longitude Number the default location longitude (degree)
latitude Number the default location latitude (degree)
altitude Number the default location altitude (meter)
orientation Object the default map orientation
Properties
Name Type Description
heading Object the default map orientation heading (degree)
pitch Object the default map orientation pitch (degree)
Source:
Example
import CesiumView from 'core/ui/view/map/CesiumView.js';

 // style it with a moving point marker
 let pointMarker = new PointMarkerLayer({
	dataSourceId: gpsDataSource.id,
	getLocation: (rec) => ({
		x: rec.location.lon,
		y: rec.location.lat
	}),
	orientation: {
		heading: 0
	},
	icon: 'images/car-location.png',
	iconAnchor: [16, 40]
});

 // #region snippet_cesium_location_view
 // create Cesium view
 let cesiumView = new CesiumView({
	container: 'cesium-container',
	layers: [pointMarker]
});

Extends

Methods

addCoPlanarPolygon(properties) → {Entity}

Adds a coplanar polygon to the coplanar polygon layer
Parameters:
Name Type Description
properties Object the properties to use in constructing the coplanar polygon
Source:
Returns:
Type
Entity

addCoPlanarPolygon(properties) → {Entity}

Adds a coplanar polygon to the coplanar polygon layer
Parameters:
Name Type Description
properties Object the properties to use in constructing the coplanar polygon
Source:
Returns:
Type
Entity

(async, protected) addDrapedImageToLayer(layer, drapedImageObject)

Associate a drapedImageId to a Layer for a fast lookup
Parameters:
Name Type Description
layer ImageDraping.props the Layer object
drapedImageObject Object the Map drapedImage object
Overrides:
Source:

addEllipse(properties) → {Entity}

Add an Ellipse to the view
Parameters:
Name Type Description
properties
Properties
Name Type Description
id The id of the ellipse
name The assigned name of the ellipse
position [] The ellipse's center point in the fixed frame.
semiMajorAxis Number The length of the ellipse's semi-major axis in meters.
semiMinorAxis Number The length of the ellipse's semi-minor axis in meters.
height Number 0.0 optionalThe distance in meters between the ellipse and the ellipsoid surface.
extrudedHeight Number optionalThe distance in meters between the ellipse's extruded face and the ellipsoid surface.
rotation Number 0.0 optionalThe angle of rotation counter-clockwise from north.
stRotation Number 0.0 optionalThe rotation of the texture coordinates counter-clockwise from north.
granularity Number CesiumMath.RADIANS_PER_DEGREE optionalThe angular distance between points on the ellipse in radians.
clampToGround boolean Flag to indicate if ellipse needs to be clamped to ground
color The color of the ellipse
transparency The level of transparency or alpha value
Source:
Returns:
Type
Entity

addEllipse(properties) → {Entity}

Add an Ellipse to the view
Parameters:
Name Type Description
properties
Properties
Name Type Description
id The id of the ellipse
name The assigned name of the ellipse
position [] The ellipse's center point in the fixed frame.
semiMajorAxis Number The length of the ellipse's semi-major axis in meters.
semiMinorAxis Number The length of the ellipse's semi-minor axis in meters.
height Number 0.0 optionalThe distance in meters between the ellipse and the ellipsoid surface.
extrudedHeight Number optionalThe distance in meters between the ellipse's extruded face and the ellipsoid surface.
rotation Number 0.0 optionalThe angle of rotation counter-clockwise from north.
stRotation Number 0.0 optionalThe rotation of the texture coordinates counter-clockwise from north.
granularity Number CesiumMath.RADIANS_PER_DEGREE optionalThe angular distance between points on the ellipse in radians.
clampToGround boolean Flag to indicate if ellipse needs to be clamped to ground
color The color of the ellipse
transparency The level of transparency or alpha value
Source:
Returns:
Type
Entity

(async, protected) addEllipseToLayer(layer, ellipseObject)

Associate a ellipseId to a Layer for a fast lookup
Parameters:
Name Type Description
layer Ellipse.props the Layer object
ellipseObject Object the Map ellipse object
Overrides:
Source:

addImageryProvider(type, url, layers, imageFormat, options) → {*}

Parameters:
Name Type Description
type
url
layers
imageFormat
options
Source:
Returns:
Type
*

addImageryProvider(type, url, layers, imageFormat, options) → {*}

Parameters:
Name Type Description
type
url
layers
imageFormat
options
Source:
Returns:
Type
*

addLayer(layer)

Adds a layer to the view. A broadcastChannel is going to listen the new dataSources
Parameters:
Name Type Description
layer Layer The layer object
Overrides:
Source:

(async, protected) addMarkerToLayer(layer, markerObject)

Associate a markerId to a Layer for a fast lookup
Parameters:
Name Type Description
layer PointMarkerLayer.props the Layer object
markerObject Object the Map marker object
Overrides:
Source:

addPolygon(properties) → {PrimitiveCollection}

Adds a polygon to the polygon layer
Parameters:
Name Type Description
properties Object the properties to use in constructing the polygon
Source:
Returns:
Type
PrimitiveCollection

addPolygon(properties) → {PrimitiveCollection}

Adds a polygon to the polygon layer
Parameters:
Name Type Description
properties Object the properties to use in constructing the polygon
Source:
Returns:
Type
PrimitiveCollection

addPolyline(properties) → {Object}

Add a polyline to the map.
Parameters:
Name Type Description
properties Object
Source:
Returns:
the new created polyline
Type
Object

addPolyline(properties) → {Object}

Add a polyline to the map.
Parameters:
Name Type Description
properties Object
Source:
Returns:
the new created polyline
Type
Object

(async, protected) addPolylineToLayer(layer, polylineObject)

Associate a polylineId to a Layer for a fast lookup
Parameters:
Name Type Description
layer Polyline.props the Layer object
polylineObject Object the Map polyline object
Overrides:
Source:

attachTo(divId)

Attach the view to a specific div. If the view has already been attached to a div, it will be removed from its current parent and will be attached to new one. Note: the onResize() is called at the end of the process.
Parameters:
Name Type Description
divId String The div element to attach to
Overrides:
Source:

getDataSourcesId() → {Array.<String>}

Gets the list of the dataSource ids contained into the view.
Overrides:
Source:
Returns:
The list of dataSource ids
Type
Array.<String>

getDivId() → {String}

Gets the div id of the DOM element.
Overrides:
Source:
Returns:
The div id of the view
Type
String

(protected) getDrapedImage(layer)

Get the draped image associate to the Layer
Parameters:
Name Type Description
layer ImageDrapingLayer.props the Layer Object
Overrides:
Source:

(protected) getEllipse(layer)

Get the ellipse associate to the Layer
Parameters:
Name Type Description
layer Ellipse.props the Layer Object
Overrides:
Source:

(protected) getEllipsoids()

Get all ellpsoids contained in this view
Overrides:
Source:

getId() → {String}

Gets the inner id of the view object.
Overrides:
Source:
Returns:
The id of the view
Type
String

getLayer(layerId) → {Layer}

Get the Layer associated to its id
Parameters:
Name Type Description
layerId String the id of the Layer
Overrides:
Source:
Returns:
- the corresponding layer, null otherwise
Type
Layer

getLayerId(id) → {null|String}

Gets the the Layer id from a concatenated id
Parameters:
Name Type Description
id String the concatenated such as layerId$markerId
Overrides:
Source:
Returns:
the Layer id
Type
null | String

(protected) getMarker(props)

Get the markerId associate to the Layer
Parameters:
Name Type Description
props PointMarkerLayer.props the Layer Object
Overrides:
Source:

getMarkerId(id) → {null|String}

Gets the the Marker id from a concatenated id
Parameters:
Name Type Description
id String the concatenated such as layerId$markerId
Overrides:
Source:
Returns:
the marker id
Type
null | String

(protected) getMarkers()

Get all markers contained in this view
Overrides:
Source:

(protected) getPolyline(layer)

Get the ellipse associate to the Layer
Parameters:
Name Type Description
layer Ellipse.props the Layer Object
Overrides:
Source:

(protected) getPolylines()

Get all polylines contained in this view
Overrides:
Source:

hide()

Hide the view
Overrides:
Source:

onMarkerHover(markerId, markerObject, layer, event)

Method to call onHover Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Overrides:
Source:

onMarkerLeftClick(markerId, markerObject, layer, event)

Method to call onLeftClick Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Overrides:
Source:

onMarkerMove(markerId, markerObject, layer, event)

Method to call onMove Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Overrides:
Source:

onMarkerRightClick(markerId, markerObject, layer, event)

Method to call onRightClick Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Overrides:
Source:

removeAllFromLayer(layer)

Remove Corresponding Layer
Parameters:
Name Type Description
layer Layer The layer object
Overrides:
Source:

removeAllFromLayers()

Removes all view item from the view.
Overrides:
Source:

(protected) removeDrapedImageFromLayer(drapedImage)

Abstract method to remove a draped image from its corresponding layer. This is library dependant.
Parameters:
Name Type Description
drapedImage Object The Map drapedImage object
Overrides:
Source:

removeDrapedImages(imageDraping)

Remove the drapedImage corresponding to a ImageDraping Layer
Parameters:
Name Type Description
imageDraping ImageDraping the layer to remove the drapedImage from
Overrides:
Source:

removeEllipseFromLayer(ellipse)

Removes an ellipse
Parameters:
Name Type Description
ellipse The ellipse to remove
Source:

removeEllipseFromLayer(ellipse)

Removes an ellipse
Parameters:
Name Type Description
ellipse The ellipse to remove
Source:

removeEllipsoids(ellipse)

Remove the ellipsoids corresponding to a EllipseLayer Layer
Parameters:
Name Type Description
ellipse Ellipse the layer to remove the ellipsoids from
Overrides:
Source:

removeFrustums(polyline)

Remove the frustums corresponding to a Frustum Layer
Parameters:
Name Type Description
polyline FrustumLayer the layer to remove the Frustum from
Overrides:
Source:

(protected) removeMarkerFromLayer(marker)

Abstract method to remove a marker from its corresponding layer. This is library dependant.
Parameters:
Name Type Description
marker Object The Map marker object
Overrides:
Source:

removeMarkers(layer)

Remove the markers corresponding to a PointMarker Layer
Parameters:
Name Type Description
layer PointMarkerLayer the layer to remove the markers from
Overrides:
Source:

removePolygonFromLayer(polygon)

Abstract method to remove a polygon from its corresponding layer. This is library dependent.
Parameters:
Name Type Description
polygon Object The Map polygon object
Overrides:
Source:

removePolygonFromLayer(polygon)

Abstract method to remove a polygon from its corresponding layer. This is library dependent.
Parameters:
Name Type Description
polygon Object The Map polygon object
Overrides:
Source:

removePolylineFromLayer(polyline)

Abstract method to remove a polyline from its corresponding layer. This is library dependent.
Parameters:
Name Type Description
polyline Object The Map marker object
Overrides:
Source:

removePolylineFromLayer(polyline)

Abstract method to remove a polyline from its corresponding layer. This is library dependent.
Parameters:
Name Type Description
polyline Object The Map marker object
Overrides:
Source:

removePolylines(polyline)

Remove the polylines corresponding to a PolylineLayer Layer
Parameters:
Name Type Description
polyline Polyline the layer to remove the polylines from
Overrides:
Source:

reset()

Calls for resetting the view.
Overrides:
Source:

(async) setData(dataSourceId, data)

Set the data to the view. Each view has to handle the kind of the data separately.
Parameters:
Name Type Description
dataSourceId String The dataSource id of the source providing the data
data Array.<any> The data array to set
Overrides:
Source:

show(properties)

Show the view.
Parameters:
Name Type Description
properties Object A generic object
Overrides:
Source:

(async) updateCoPlanarPolygon(properties)

Retrieves the coplanar polygon and updates it or creates a new instance and adds with the given properties the coplanar polygon to the layer
Parameters:
Name Type Description
properties Object properties to apply in updating polygon
Source:

(async) updateCoPlanarPolygon(properties)

Retrieves the coplanar polygon and updates it or creates a new instance and adds with the given properties the coplanar polygon to the layer
Parameters:
Name Type Description
properties Object properties to apply in updating polygon
Source:

(async) updateDrapedImage(props)

Updates the image draping associated to the layer.
Parameters:
Name Type Description
props ImageDrapingLayer.props The layer properties allowing the update of the image draping
Source:

(async) updateDrapedImage(props)

Updates the image draping associated to the layer.
Parameters:
Name Type Description
props ImageDrapingLayer.props The layer properties allowing the update of the image draping
Source:

(async) updateEllipse(props)

Updates an Ellipse if it exists or adds a new one to the view
Parameters:
Name Type Description
props
Properties
Name Type Description
ellipseId
id The id of the ellipse
position [] The ellipse's center point in the fixed frame.
semiMajorAxis Number The length of the ellipse's semi-major axis in meters.
semiMinorAxis Number The length of the ellipse's semi-minor axis in meters.
height Number 0.0 optionalThe distance in meters between the ellipse and the ellipsoid surface.
extrudedHeight Number optionalThe distance in meters between the ellipse's extruded face and the ellipsoid surface.
rotation Number 0.0 optionalThe angle of rotation counter-clockwise from north.
stRotation Number 0.0 optionalThe rotation of the texture coordinates counter-clockwise from north.
granularity Number CesiumMath.RADIANS_PER_DEGREE optionalThe angular distance between points on the ellipse in radians.
clampToGround boolean Flag to indicate if ellipse needs to be clamped to ground
transparency The level of transparency or alpha value
color The color of the ellipse
Source:

(async) updateEllipse(props)

Updates an Ellipse if it exists or adds a new one to the view
Parameters:
Name Type Description
props
Properties
Name Type Description
ellipseId
id The id of the ellipse
position [] The ellipse's center point in the fixed frame.
semiMajorAxis Number The length of the ellipse's semi-major axis in meters.
semiMinorAxis Number The length of the ellipse's semi-minor axis in meters.
height Number 0.0 optionalThe distance in meters between the ellipse and the ellipsoid surface.
extrudedHeight Number optionalThe distance in meters between the ellipse's extruded face and the ellipsoid surface.
rotation Number 0.0 optionalThe angle of rotation counter-clockwise from north.
stRotation Number 0.0 optionalThe rotation of the texture coordinates counter-clockwise from north.
granularity Number CesiumMath.RADIANS_PER_DEGREE optionalThe angular distance between points on the ellipse in radians.
clampToGround boolean Flag to indicate if ellipse needs to be clamped to ground
transparency The level of transparency or alpha value
color The color of the ellipse
Source:

(async) updatePolygon(properties)

Retrieves the polygon and updates it or creates a new instance and adds with the given properties the polygon to the layer
Parameters:
Name Type Description
properties Object properties to apply in updating polygon
Source:

(async) updatePolygon(properties)

Retrieves the polygon and updates it or creates a new instance and adds with the given properties the polygon to the layer
Parameters:
Name Type Description
properties Object properties to apply in updating polygon
Source:

(async) updatePolyline(props)

Updates a given polyline, or adds it if it does not currently exist
Parameters:
Name Type Description
props The properties containing the updated data
Source:

(async) updatePolyline(props)

Updates a given polyline, or adds it if it does not currently exist
Parameters:
Name Type Description
props The properties containing the updated data
Source:

Events

beforeAddingItems

This method is called before attaching any view items passed as arguments in the constructor of the view.
Parameters:
Name Type Description
options Object A generic object to use
Overrides:
Source:

onResize

Callback called when the view is resized
Overrides:
Source:

CesiumView(propertiesopt)

This class is in charge of displaying GPS/orientation data by adding a marker to the Cesium object.

Constructor

new CesiumView(propertiesopt)

Create a View.
Parameters:
Name Type Attributes Default Description
properties Object <optional>
{} the properties of the view
Properties
Name Type Attributes Default Description
container String The div element to attach to
layers Array.<Object> <optional>
[] The initial layers to add
autoZoomOnFirstMarker Boolean <optional>
false auto zoom on the first added marker
options Object <optional>
{} Properties which can override the default framework ones
Properties
Name Type Attributes Default Description
viewer Object <optional>
the Viewer object to pass Cesium Viewer object
viewerProps Object <optional>
{} the properties of the Cesium Viewer object
location Object <optional>
the default location to set
Properties
Name Type Description
longitude Number the default location longitude (degree)
latitude Number the default location latitude (degree)
altitude Number the default location altitude (meter)
orientation Object the default map orientation
Properties
Name Type Description
heading Object the default map orientation heading (degree)
pitch Object the default map orientation pitch (degree)
Source:
Example
import CesiumView from 'core/ui/view/map/CesiumView.js';

 // style it with a moving point marker
 let pointMarker = new PointMarkerLayer({
	dataSourceId: gpsDataSource.id,
	getLocation: (rec) => ({
		x: rec.location.lon,
		y: rec.location.lat
	}),
	orientation: {
		heading: 0
	},
	icon: 'images/car-location.png',
	iconAnchor: [16, 40]
});

 // #region snippet_cesium_location_view
 // create Cesium view
 let cesiumView = new CesiumView({
	container: 'cesium-container',
	layers: [pointMarker]
});

Extends

Methods

addCoPlanarPolygon(properties) → {Entity}

Adds a coplanar polygon to the coplanar polygon layer
Parameters:
Name Type Description
properties Object the properties to use in constructing the coplanar polygon
Source:
Returns:
Type
Entity

addCoPlanarPolygon(properties) → {Entity}

Adds a coplanar polygon to the coplanar polygon layer
Parameters:
Name Type Description
properties Object the properties to use in constructing the coplanar polygon
Source:
Returns:
Type
Entity

(async, protected) addDrapedImageToLayer(layer, drapedImageObject)

Associate a drapedImageId to a Layer for a fast lookup
Parameters:
Name Type Description
layer ImageDraping.props the Layer object
drapedImageObject Object the Map drapedImage object
Overrides:
Source:

addEllipse(properties) → {Entity}

Add an Ellipse to the view
Parameters:
Name Type Description
properties
Properties
Name Type Description
id The id of the ellipse
name The assigned name of the ellipse
position [] The ellipse's center point in the fixed frame.
semiMajorAxis Number The length of the ellipse's semi-major axis in meters.
semiMinorAxis Number The length of the ellipse's semi-minor axis in meters.
height Number 0.0 optionalThe distance in meters between the ellipse and the ellipsoid surface.
extrudedHeight Number optionalThe distance in meters between the ellipse's extruded face and the ellipsoid surface.
rotation Number 0.0 optionalThe angle of rotation counter-clockwise from north.
stRotation Number 0.0 optionalThe rotation of the texture coordinates counter-clockwise from north.
granularity Number CesiumMath.RADIANS_PER_DEGREE optionalThe angular distance between points on the ellipse in radians.
clampToGround boolean Flag to indicate if ellipse needs to be clamped to ground
color The color of the ellipse
transparency The level of transparency or alpha value
Source:
Returns:
Type
Entity

addEllipse(properties) → {Entity}

Add an Ellipse to the view
Parameters:
Name Type Description
properties
Properties
Name Type Description
id The id of the ellipse
name The assigned name of the ellipse
position [] The ellipse's center point in the fixed frame.
semiMajorAxis Number The length of the ellipse's semi-major axis in meters.
semiMinorAxis Number The length of the ellipse's semi-minor axis in meters.
height Number 0.0 optionalThe distance in meters between the ellipse and the ellipsoid surface.
extrudedHeight Number optionalThe distance in meters between the ellipse's extruded face and the ellipsoid surface.
rotation Number 0.0 optionalThe angle of rotation counter-clockwise from north.
stRotation Number 0.0 optionalThe rotation of the texture coordinates counter-clockwise from north.
granularity Number CesiumMath.RADIANS_PER_DEGREE optionalThe angular distance between points on the ellipse in radians.
clampToGround boolean Flag to indicate if ellipse needs to be clamped to ground
color The color of the ellipse
transparency The level of transparency or alpha value
Source:
Returns:
Type
Entity

(async, protected) addEllipseToLayer(layer, ellipseObject)

Associate a ellipseId to a Layer for a fast lookup
Parameters:
Name Type Description
layer Ellipse.props the Layer object
ellipseObject Object the Map ellipse object
Overrides:
Source:

addImageryProvider(type, url, layers, imageFormat, options) → {*}

Parameters:
Name Type Description
type
url
layers
imageFormat
options
Source:
Returns:
Type
*

addImageryProvider(type, url, layers, imageFormat, options) → {*}

Parameters:
Name Type Description
type
url
layers
imageFormat
options
Source:
Returns:
Type
*

addLayer(layer)

Adds a layer to the view. A broadcastChannel is going to listen the new dataSources
Parameters:
Name Type Description
layer Layer The layer object
Overrides:
Source:

(async, protected) addMarkerToLayer(layer, markerObject)

Associate a markerId to a Layer for a fast lookup
Parameters:
Name Type Description
layer PointMarkerLayer.props the Layer object
markerObject Object the Map marker object
Overrides:
Source:

addPolygon(properties) → {PrimitiveCollection}

Adds a polygon to the polygon layer
Parameters:
Name Type Description
properties Object the properties to use in constructing the polygon
Source:
Returns:
Type
PrimitiveCollection

addPolygon(properties) → {PrimitiveCollection}

Adds a polygon to the polygon layer
Parameters:
Name Type Description
properties Object the properties to use in constructing the polygon
Source:
Returns:
Type
PrimitiveCollection

addPolyline(properties) → {Object}

Add a polyline to the map.
Parameters:
Name Type Description
properties Object
Source:
Returns:
the new created polyline
Type
Object

addPolyline(properties) → {Object}

Add a polyline to the map.
Parameters:
Name Type Description
properties Object
Source:
Returns:
the new created polyline
Type
Object

(async, protected) addPolylineToLayer(layer, polylineObject)

Associate a polylineId to a Layer for a fast lookup
Parameters:
Name Type Description
layer Polyline.props the Layer object
polylineObject Object the Map polyline object
Overrides:
Source:

attachTo(divId)

Attach the view to a specific div. If the view has already been attached to a div, it will be removed from its current parent and will be attached to new one. Note: the onResize() is called at the end of the process.
Parameters:
Name Type Description
divId String The div element to attach to
Overrides:
Source:

getDataSourcesId() → {Array.<String>}

Gets the list of the dataSource ids contained into the view.
Overrides:
Source:
Returns:
The list of dataSource ids
Type
Array.<String>

getDivId() → {String}

Gets the div id of the DOM element.
Overrides:
Source:
Returns:
The div id of the view
Type
String

(protected) getDrapedImage(layer)

Get the draped image associate to the Layer
Parameters:
Name Type Description
layer ImageDrapingLayer.props the Layer Object
Overrides:
Source:

(protected) getEllipse(layer)

Get the ellipse associate to the Layer
Parameters:
Name Type Description
layer Ellipse.props the Layer Object
Overrides:
Source:

(protected) getEllipsoids()

Get all ellpsoids contained in this view
Overrides:
Source:

getId() → {String}

Gets the inner id of the view object.
Overrides:
Source:
Returns:
The id of the view
Type
String

getLayer(layerId) → {Layer}

Get the Layer associated to its id
Parameters:
Name Type Description
layerId String the id of the Layer
Overrides:
Source:
Returns:
- the corresponding layer, null otherwise
Type
Layer

getLayerId(id) → {null|String}

Gets the the Layer id from a concatenated id
Parameters:
Name Type Description
id String the concatenated such as layerId$markerId
Overrides:
Source:
Returns:
the Layer id
Type
null | String

(protected) getMarker(props)

Get the markerId associate to the Layer
Parameters:
Name Type Description
props PointMarkerLayer.props the Layer Object
Overrides:
Source:

getMarkerId(id) → {null|String}

Gets the the Marker id from a concatenated id
Parameters:
Name Type Description
id String the concatenated such as layerId$markerId
Overrides:
Source:
Returns:
the marker id
Type
null | String

(protected) getMarkers()

Get all markers contained in this view
Overrides:
Source:

(protected) getPolyline(layer)

Get the ellipse associate to the Layer
Parameters:
Name Type Description
layer Ellipse.props the Layer Object
Overrides:
Source:

(protected) getPolylines()

Get all polylines contained in this view
Overrides:
Source:

hide()

Hide the view
Overrides:
Source:

onMarkerHover(markerId, markerObject, layer, event)

Method to call onHover Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Overrides:
Source:

onMarkerLeftClick(markerId, markerObject, layer, event)

Method to call onLeftClick Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Overrides:
Source:

onMarkerMove(markerId, markerObject, layer, event)

Method to call onMove Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Overrides:
Source:

onMarkerRightClick(markerId, markerObject, layer, event)

Method to call onRightClick Layer method if exists
Parameters:
Name Type Description
markerId String the Layer markerId
markerObject Object the View marker object
layer PointMarkerLayer the Layer object
event Object the original Map View event
Overrides:
Source:

removeAllFromLayer(layer)

Remove Corresponding Layer
Parameters:
Name Type Description
layer Layer The layer object
Overrides:
Source:

removeAllFromLayers()

Removes all view item from the view.
Overrides:
Source:

(protected) removeDrapedImageFromLayer(drapedImage)

Abstract method to remove a draped image from its corresponding layer. This is library dependant.
Parameters:
Name Type Description
drapedImage Object The Map drapedImage object
Overrides:
Source:

removeDrapedImages(imageDraping)

Remove the drapedImage corresponding to a ImageDraping Layer
Parameters:
Name Type Description
imageDraping ImageDraping the layer to remove the drapedImage from
Overrides:
Source:

removeEllipseFromLayer(ellipse)

Removes an ellipse
Parameters:
Name Type Description
ellipse The ellipse to remove
Source:

removeEllipseFromLayer(ellipse)

Removes an ellipse
Parameters:
Name Type Description
ellipse The ellipse to remove
Source:

removeEllipsoids(ellipse)

Remove the ellipsoids corresponding to a EllipseLayer Layer
Parameters:
Name Type Description
ellipse Ellipse the layer to remove the ellipsoids from
Overrides:
Source:

removeFrustums(polyline)

Remove the frustums corresponding to a Frustum Layer
Parameters:
Name Type Description
polyline FrustumLayer the layer to remove the Frustum from
Overrides:
Source:

(protected) removeMarkerFromLayer(marker)

Abstract method to remove a marker from its corresponding layer. This is library dependant.
Parameters:
Name Type Description
marker Object The Map marker object
Overrides:
Source:

removeMarkers(layer)

Remove the markers corresponding to a PointMarker Layer
Parameters:
Name Type Description
layer PointMarkerLayer the layer to remove the markers from
Overrides:
Source:

removePolygonFromLayer(polygon)

Abstract method to remove a polygon from its corresponding layer. This is library dependent.
Parameters:
Name Type Description
polygon Object The Map polygon object
Overrides:
Source:

removePolygonFromLayer(polygon)

Abstract method to remove a polygon from its corresponding layer. This is library dependent.
Parameters:
Name Type Description
polygon Object The Map polygon object
Overrides:
Source:

removePolylineFromLayer(polyline)

Abstract method to remove a polyline from its corresponding layer. This is library dependent.
Parameters:
Name Type Description
polyline Object The Map marker object
Overrides:
Source:

removePolylineFromLayer(polyline)

Abstract method to remove a polyline from its corresponding layer. This is library dependent.
Parameters:
Name Type Description
polyline Object The Map marker object
Overrides:
Source:

removePolylines(polyline)

Remove the polylines corresponding to a PolylineLayer Layer
Parameters:
Name Type Description
polyline Polyline the layer to remove the polylines from
Overrides:
Source:

reset()

Calls for resetting the view.
Overrides:
Source:

(async) setData(dataSourceId, data)

Set the data to the view. Each view has to handle the kind of the data separately.
Parameters:
Name Type Description
dataSourceId String The dataSource id of the source providing the data
data Array.<any> The data array to set
Overrides:
Source:

show(properties)

Show the view.
Parameters:
Name Type Description
properties Object A generic object
Overrides:
Source:

(async) updateCoPlanarPolygon(properties)

Retrieves the coplanar polygon and updates it or creates a new instance and adds with the given properties the coplanar polygon to the layer
Parameters:
Name Type Description
properties Object properties to apply in updating polygon
Source:

(async) updateCoPlanarPolygon(properties)

Retrieves the coplanar polygon and updates it or creates a new instance and adds with the given properties the coplanar polygon to the layer
Parameters:
Name Type Description
properties Object properties to apply in updating polygon
Source:

(async) updateDrapedImage(props)

Updates the image draping associated to the layer.
Parameters:
Name Type Description
props ImageDrapingLayer.props The layer properties allowing the update of the image draping
Source:

(async) updateDrapedImage(props)

Updates the image draping associated to the layer.
Parameters:
Name Type Description
props ImageDrapingLayer.props The layer properties allowing the update of the image draping
Source:

(async) updateEllipse(props)

Updates an Ellipse if it exists or adds a new one to the view
Parameters:
Name Type Description
props
Properties
Name Type Description
ellipseId
id The id of the ellipse
position [] The ellipse's center point in the fixed frame.
semiMajorAxis Number The length of the ellipse's semi-major axis in meters.
semiMinorAxis Number The length of the ellipse's semi-minor axis in meters.
height Number 0.0 optionalThe distance in meters between the ellipse and the ellipsoid surface.
extrudedHeight Number optionalThe distance in meters between the ellipse's extruded face and the ellipsoid surface.
rotation Number 0.0 optionalThe angle of rotation counter-clockwise from north.
stRotation Number 0.0 optionalThe rotation of the texture coordinates counter-clockwise from north.
granularity Number CesiumMath.RADIANS_PER_DEGREE optionalThe angular distance between points on the ellipse in radians.
clampToGround boolean Flag to indicate if ellipse needs to be clamped to ground
transparency The level of transparency or alpha value
color The color of the ellipse
Source:

(async) updateEllipse(props)

Updates an Ellipse if it exists or adds a new one to the view
Parameters:
Name Type Description
props
Properties
Name Type Description
ellipseId
id The id of the ellipse
position [] The ellipse's center point in the fixed frame.
semiMajorAxis Number The length of the ellipse's semi-major axis in meters.
semiMinorAxis Number The length of the ellipse's semi-minor axis in meters.
height Number 0.0 optionalThe distance in meters between the ellipse and the ellipsoid surface.
extrudedHeight Number optionalThe distance in meters between the ellipse's extruded face and the ellipsoid surface.
rotation Number 0.0 optionalThe angle of rotation counter-clockwise from north.
stRotation Number 0.0 optionalThe rotation of the texture coordinates counter-clockwise from north.
granularity Number CesiumMath.RADIANS_PER_DEGREE optionalThe angular distance between points on the ellipse in radians.
clampToGround boolean Flag to indicate if ellipse needs to be clamped to ground
transparency The level of transparency or alpha value
color The color of the ellipse
Source:

(async) updatePolygon(properties)

Retrieves the polygon and updates it or creates a new instance and adds with the given properties the polygon to the layer
Parameters:
Name Type Description
properties Object properties to apply in updating polygon
Source:

(async) updatePolygon(properties)

Retrieves the polygon and updates it or creates a new instance and adds with the given properties the polygon to the layer
Parameters:
Name Type Description
properties Object properties to apply in updating polygon
Source:

(async) updatePolyline(props)

Updates a given polyline, or adds it if it does not currently exist
Parameters:
Name Type Description
props The properties containing the updated data
Source:

(async) updatePolyline(props)

Updates a given polyline, or adds it if it does not currently exist
Parameters:
Name Type Description
props The properties containing the updated data
Source:

Events

beforeAddingItems

This method is called before attaching any view items passed as arguments in the constructor of the view.
Parameters:
Name Type Description
options Object A generic object to use
Overrides:
Source:

onResize

Callback called when the view is resized
Overrides:
Source: