Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_.prototype.update = function(context, frameState, commandList) {
if (!Cesium.defined(this.ellipsoid)) {
throw new Cesium.DeveloperError('this.ellipsoid must be defined.')
}
if (!Cesium.defined(this.appearance)) {
throw new Cesium.DeveloperError('this.material must be defined.')
}
if (this.granularity < 0.0) {
throw new Cesium.DeveloperError(
'this.granularity and scene2D/scene3D overrides must be greater than zero.'
)
}
if (!this.show) {
return
}
if (!this._createPrimitive && !Cesium.defined(this._primitive)) {
// No positions/hierarchy to draw
return
}
function _(drawHelper, options) {
// container must be specified
if (!Cesium.defined(options.container)) {
throw new Cesium.DeveloperError('Container is required')
}
const drawOptions = {
markerIcon: './img/glyphicons_242_google_maps.png',
polylineIcon: './img/glyphicons_097_vector_path_line.png',
polygonIcon: './img/glyphicons_096_vector_path_polygon.png',
circleIcon: './img/glyphicons_095_vector_path_circle.png',
extentIcon: './img/glyphicons_094_vector_path_square.png',
clearIcon: './img/glyphicons_067_cleaning.png',
polylineDrawingOptions: defaultPolylineOptions,
polygonDrawingOptions: defaultPolygonOptions,
extentDrawingOptions: defaultExtentOptions,
circleDrawingOptions: defaultCircleOptions,
}
fillOptions(options, drawOptions)
_.prototype.update = function(context, frameState, commandList) {
if (!Cesium.defined(this.ellipsoid)) {
throw new Cesium.DeveloperError('this.ellipsoid must be defined.')
}
if (!Cesium.defined(this.appearance)) {
throw new Cesium.DeveloperError('this.material must be defined.')
}
if (this.granularity < 0.0) {
throw new Cesium.DeveloperError(
'this.granularity and scene2D/scene3D overrides must be greater than zero.'
)
}
if (!this.show) {
return
}
if (!this._createPrimitive && !Cesium.defined(this._primitive)) {
// No positions/hierarchy to draw
return
}
if (
this._createPrimitive ||
this._ellipsoid !== this.ellipsoid ||
function viewerCesiumNavigationMixin(viewer, options) {
if (!defined(viewer)) {
throw new DeveloperError('viewer is required.')
}
var cesiumNavigation = init(viewer, options)
cesiumNavigation.addOnDestroyListener((function (viewer) {
return function () {
delete viewer.cesiumNavigation
}
})(viewer))
defineProperties(viewer, {
cesiumNavigation: {
configurable: true,
get: function () {
return viewer.cesiumWidget.cesiumNavigation
}
UserInterfaceControl.prototype.activate = function () {
throw new DeveloperError('activate must be implemented in the derived class.')
}
function _(options) {
if (!(Cesium.defined(options.center) && Cesium.defined(options.radius))) {
throw new Cesium.DeveloperError('Center and radius are required')
}
options = copyOptions(options, defaultSurfaceOptions)
this.initialiseOptions(options)
this.setRadius(options.radius)
}
var UserInterfaceControl = function (terria) {
if (!defined(terria)) {
throw new DeveloperError('terria is required')
}
this._terria = terria
/**
* Gets or sets the name of the control which is set as the controls title.
* This property is observable.
* @type {String}
*/
this.name = 'Unnamed Control'
/**
* Gets or sets the text to be displayed in the UI control.
* This property is observable.
* @type {String}
*/
function _(options) {
if (
!(
Cesium.defined(options.center) &&
Cesium.defined(options.semiMajorAxis) &&
Cesium.defined(options.semiMinorAxis)
)
) {
throw new Cesium.DeveloperError(
'Center and semi major and semi minor axis are required'
)
}
options = copyOptions(options, defaultEllipseOptions)
this.initialiseOptions(options)
}
function _(options) {
if (!Cesium.defined(options.extent)) {
throw new Cesium.DeveloperError('Extent is required')
}
options = copyOptions(options, defaultSurfaceOptions)
this.initialiseOptions(options)
this.setExtent(options.extent)
}
_.prototype.update = function(context, frameState, commandList) {
if (!Cesium.defined(this.ellipsoid)) {
throw new Cesium.DeveloperError('this.ellipsoid must be defined.')
}
if (!Cesium.defined(this.appearance)) {
throw new Cesium.DeveloperError('this.material must be defined.')
}
if (this.granularity < 0.0) {
throw new Cesium.DeveloperError(
'this.granularity and scene2D/scene3D overrides must be greater than zero.'
)
}
if (!this.show) {
return
}