Compare commits
4 Commits
zh
...
574538e7bb
Author | SHA1 | Date | |
---|---|---|---|
574538e7bb | |||
ff4f823a27 | |||
c6aa99792f | |||
16942a2e63 |
@ -278,7 +278,7 @@ async function init(sdk) {
|
|||||||
sdk.viewer.scene.preRender.addEventListener(syncViewer, syncObject)
|
sdk.viewer.scene.preRender.addEventListener(syncViewer, syncObject)
|
||||||
|
|
||||||
// sdk.viewer.imageryLayers.layerAdded.addEventListener(syncImageryLayerAdded);
|
// sdk.viewer.imageryLayers.layerAdded.addEventListener(syncImageryLayerAdded);
|
||||||
// sdk.viewer.imageryLayers.layerMoved.addEventListener(syncImageryLayerMoved);
|
sdk.viewer.imageryLayers.layerMoved.addEventListener(syncImageryLayerMoved);
|
||||||
// sdk.viewer.imageryLayers.layerRemoved.addEventListener(syncImageryLayerRemoved);
|
// sdk.viewer.imageryLayers.layerRemoved.addEventListener(syncImageryLayerRemoved);
|
||||||
// sdk.viewer.imageryLayers.layerShownOrHidden.addEventListener(syncImageryLayerShownOrHidden);
|
// sdk.viewer.imageryLayers.layerShownOrHidden.addEventListener(syncImageryLayerShownOrHidden);
|
||||||
|
|
||||||
@ -711,6 +711,9 @@ async function setSplitDirection(v, id, isoff = false, entityId) {
|
|||||||
status.P = true
|
status.P = true
|
||||||
status.D = true
|
status.D = true
|
||||||
options.show = true
|
options.show = true
|
||||||
|
if(thatP.type==='layer') {
|
||||||
|
options.layer_index = thatP.layer_index
|
||||||
|
}
|
||||||
target = await new thatP.constructor(sdkD, options)
|
target = await new thatP.constructor(sdkD, options)
|
||||||
if (thatP.onClick) {
|
if (thatP.onClick) {
|
||||||
target.onClick = thatP.onClick
|
target.onClick = thatP.onClick
|
||||||
@ -794,6 +797,9 @@ async function setSplitDirection(v, id, isoff = false, entityId) {
|
|||||||
status.P = false
|
status.P = false
|
||||||
status.D = true
|
status.D = true
|
||||||
options.show = true
|
options.show = true
|
||||||
|
if(thatP.type==='layer') {
|
||||||
|
options.layer_index = thatP.layer_index
|
||||||
|
}
|
||||||
target = await new thatP.constructor(sdkD, options)
|
target = await new thatP.constructor(sdkD, options)
|
||||||
if (thatP.onClick) {
|
if (thatP.onClick) {
|
||||||
target.onClick = thatP.onClick
|
target.onClick = thatP.onClick
|
||||||
@ -1033,7 +1039,13 @@ function syncImageryLayerAdded(layer, index) {
|
|||||||
sdkD.viewer.imageryLayers.addImageryProvider(layer.imageryProvider, index)
|
sdkD.viewer.imageryLayers.addImageryProvider(layer.imageryProvider, index)
|
||||||
}
|
}
|
||||||
function syncImageryLayerMoved(layer, newindxe, oldindex) {
|
function syncImageryLayerMoved(layer, newindxe, oldindex) {
|
||||||
let layerD = sdkD.viewer.imageryLayers._layers[oldindex]
|
let layerD
|
||||||
|
for (let i = 0; i < sdkD.viewer.imageryLayers._layers.length; i++) {
|
||||||
|
if (sdkD.viewer.imageryLayers._layers[i]._id === layer._id) {
|
||||||
|
layerD = sdkD.viewer.imageryLayers._layers[i]
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!layerD) {
|
if (!layerD) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -1042,13 +1054,15 @@ function syncImageryLayerMoved(layer, newindxe, oldindex) {
|
|||||||
sdkD.viewer.imageryLayers.lowerToBottom(layerD)
|
sdkD.viewer.imageryLayers.lowerToBottom(layerD)
|
||||||
}
|
}
|
||||||
// 移到最高层
|
// 移到最高层
|
||||||
else if (newindxe === sdk.viewer.imageryLayers._layers.length - 1) {
|
else if (newindxe === sdkD.viewer.imageryLayers._layers.length - 1) {
|
||||||
sdkD.viewer.imageryLayers.raiseToTop(layerD)
|
sdkD.viewer.imageryLayers.raiseToTop(layerD)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (newindxe < oldindex) {
|
if (newindxe < oldindex) {
|
||||||
|
if(newindxe<sdkD.viewer.imageryLayers._layers.length-1) {
|
||||||
sdkD.viewer.imageryLayers.lower(layerD)
|
sdkD.viewer.imageryLayers.lower(layerD)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
sdkD.viewer.imageryLayers.raise(layerD)
|
sdkD.viewer.imageryLayers.raise(layerD)
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ class PolygonObject extends Base {
|
|||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
|
@ -24,7 +24,7 @@ class AssembleObject extends Base {
|
|||||||
* @param options {object} 属性
|
* @param options {object} 属性
|
||||||
* @param options.show=true {boolean} 显示/隐藏
|
* @param options.show=true {boolean} 显示/隐藏
|
||||||
* @param options.name {string} 名称
|
* @param options.name {string} 名称
|
||||||
* @param options.color="#36c4ff" {string} 颜色
|
* @param options.color="#ff000080" {string} 颜色
|
||||||
* @param options.height {number} 高度
|
* @param options.height {number} 高度
|
||||||
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
||||||
* @param {Array.<object>} options.positions 坐标数组 [{lon,lat,alt},...]
|
* @param {Array.<object>} options.positions 坐标数组 [{lon,lat,alt},...]
|
||||||
@ -34,13 +34,13 @@ class AssembleObject extends Base {
|
|||||||
constructor(sdk, options = {}, _Dialog = {}) {
|
constructor(sdk, options = {}, _Dialog = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.color = options.color || "#36c4ff"
|
this.options.color = options.color || "#ff000080"
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
this.options.positions = options.positions || []
|
this.options.positions = options.positions || []
|
||||||
this.options.line = options.line || {}
|
this.options.line = options.line || {}
|
||||||
this.options.line.width = this.options.line.width || 2
|
this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3)
|
||||||
this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)'
|
this.options.line.color = this.options.line.color || '#ff000080'
|
||||||
this.options['area-unit'] = options['area-unit'] || '平方米'
|
this.options['area-unit'] = options['area-unit'] || '平方米'
|
||||||
this.entity
|
this.entity
|
||||||
this.event = new MouseEvent(this.sdk)
|
this.event = new MouseEvent(this.sdk)
|
||||||
@ -57,8 +57,8 @@ class AssembleObject extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -106,14 +106,14 @@ class AssembleObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let material = Cesium.Color.fromCssColorString(v)
|
let material = Cesium.Color.fromCssColorString(this.options.color)
|
||||||
if (this.sdk.viewer.scene.mode === 2) {
|
if (this.sdk.viewer.scene.mode === 2) {
|
||||||
material = new Cesium.CustomColorMaterialSource({
|
material = new Cesium.CustomColorMaterialSource({
|
||||||
color: v
|
color: this.options.color
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.entity.polygon.material = material
|
this.entity.polygon.material = material
|
||||||
@ -123,14 +123,14 @@ class AssembleObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.color = c
|
this.color = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.color = 'rgba(255,255,255,1)'
|
this.color = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.color[i] = colorPicker
|
this._elms.color[i] = colorPicker
|
||||||
@ -238,25 +238,25 @@ class AssembleObject extends Base {
|
|||||||
return this.options.line.color
|
return this.options.line.color
|
||||||
}
|
}
|
||||||
set lineColor(v) {
|
set lineColor(v) {
|
||||||
this.options.line.color = v
|
this.options.line.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.entity.polyline.material = Cesium.Color.fromCssColorString(v)
|
this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color)
|
||||||
if (this._elms.lineColor) {
|
if (this._elms.lineColor) {
|
||||||
this._elms.lineColor.forEach((item, i) => {
|
this._elms.lineColor.forEach((item, i) => {
|
||||||
let lineColorPicker = new ewPlugins('colorpicker', {
|
let lineColorPicker = new ewPlugins('colorpicker', {
|
||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.line.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.lineColor = c
|
this.lineColor = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.lineColor = 'rgba(255,255,255,1)'
|
this.lineColor = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.lineColor[i] = lineColorPicker
|
this._elms.lineColor[i] = lineColorPicker
|
||||||
@ -268,10 +268,10 @@ class AssembleObject extends Base {
|
|||||||
return this.options.line.width
|
return this.options.line.width
|
||||||
}
|
}
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.line.width = v
|
this.options.line.width = ((v || v === 0) ? v : 3)
|
||||||
this.entity.polyline.width = v
|
this.entity.polyline.width = this.options.line.width
|
||||||
this._elms.lineColor && this._elms.lineColor.forEach((item) => {
|
this._elms.lineColor && this._elms.lineColor.forEach((item) => {
|
||||||
item.value = v
|
item.value = this.options.line.width
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ class AssembleObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -24,7 +24,7 @@ class AttackArrowObject extends Base {
|
|||||||
* @param options {object} 属性
|
* @param options {object} 属性
|
||||||
* @param options.show=true {boolean} 显示/隐藏
|
* @param options.show=true {boolean} 显示/隐藏
|
||||||
* @param options.name {string} 名称
|
* @param options.name {string} 名称
|
||||||
* @param options.color="#36c4ff" {string} 颜色
|
* @param options.color="#ff000080" {string} 颜色
|
||||||
* @param options.height {number} 高度
|
* @param options.height {number} 高度
|
||||||
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
||||||
* @param {Array.<object>} options.positions 坐标数组 [{lon,lat,alt},...]
|
* @param {Array.<object>} options.positions 坐标数组 [{lon,lat,alt},...]
|
||||||
@ -34,13 +34,13 @@ class AttackArrowObject extends Base {
|
|||||||
constructor(sdk, options = {}, _Dialog = {}) {
|
constructor(sdk, options = {}, _Dialog = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.color = options.color || "#36c4ff"
|
this.options.color = options.color || "#ff000080"
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options.positions = options.positions || []
|
this.options.positions = options.positions || []
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
this.options.line = options.line || {}
|
this.options.line = options.line || {}
|
||||||
this.options.line.width = this.options.line.width || 2
|
this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3)
|
||||||
this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)'
|
this.options.line.color = this.options.line.color || '#ff000080'
|
||||||
this.options['area-unit'] = options['area-unit'] || '平方米'
|
this.options['area-unit'] = options['area-unit'] || '平方米'
|
||||||
this.entity
|
this.entity
|
||||||
this.event = new MouseEvent(this.sdk)
|
this.event = new MouseEvent(this.sdk)
|
||||||
@ -61,8 +61,8 @@ class AttackArrowObject extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -110,14 +110,14 @@ class AttackArrowObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let material = Cesium.Color.fromCssColorString(v)
|
let material = Cesium.Color.fromCssColorString(this.options.color)
|
||||||
if (this.sdk.viewer.scene.mode === 2) {
|
if (this.sdk.viewer.scene.mode === 2) {
|
||||||
material = new Cesium.CustomColorMaterialSource({
|
material = new Cesium.CustomColorMaterialSource({
|
||||||
color: v
|
color: this.options.color
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.entity.polygon.material = material
|
this.entity.polygon.material = material
|
||||||
@ -127,14 +127,14 @@ class AttackArrowObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.color = c
|
this.color = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.color = 'rgba(255,255,255,1)'
|
this.color = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.color[i] = colorPicker
|
this._elms.color[i] = colorPicker
|
||||||
@ -243,25 +243,25 @@ class AttackArrowObject extends Base {
|
|||||||
return this.options.line.color
|
return this.options.line.color
|
||||||
}
|
}
|
||||||
set lineColor(v) {
|
set lineColor(v) {
|
||||||
this.options.line.color = v
|
this.options.line.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.entity.polyline.material = Cesium.Color.fromCssColorString(v)
|
this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color)
|
||||||
if (this._elms.lineColor) {
|
if (this._elms.lineColor) {
|
||||||
this._elms.lineColor.forEach((item, i) => {
|
this._elms.lineColor.forEach((item, i) => {
|
||||||
let lineColorPicker = new ewPlugins('colorpicker', {
|
let lineColorPicker = new ewPlugins('colorpicker', {
|
||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.line.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.lineColor = c
|
this.lineColor = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.lineColor = 'rgba(255,255,255,1)'
|
this.lineColor = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.lineColor[i] = lineColorPicker
|
this._elms.lineColor[i] = lineColorPicker
|
||||||
@ -273,8 +273,8 @@ class AttackArrowObject extends Base {
|
|||||||
return this.options.line.width
|
return this.options.line.width
|
||||||
}
|
}
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.line.width = v
|
this.options.line.width = ((v || v === 0) ? v : 3)
|
||||||
this.entity.polyline.width = v
|
this.entity.polyline.width = this.options.line.width
|
||||||
this._elms.lineColor && this._elms.lineColor.forEach((item) => {
|
this._elms.lineColor && this._elms.lineColor.forEach((item) => {
|
||||||
item.value = v
|
item.value = v
|
||||||
})
|
})
|
||||||
@ -469,7 +469,7 @@ class AttackArrowObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -33,6 +33,7 @@ class ArcgisLayer extends BaseLayer {
|
|||||||
} else {
|
} else {
|
||||||
this.entity = this.sdk.viewer.imageryLayers.addImageryProvider(imageryProvider,)
|
this.entity = this.sdk.viewer.imageryLayers.addImageryProvider(imageryProvider,)
|
||||||
}
|
}
|
||||||
|
this.entity._id = this.options.id
|
||||||
for (let i = 0; i < this.sdk.viewer.imageryLayers._layers.length; i++) {
|
for (let i = 0; i < this.sdk.viewer.imageryLayers._layers.length; i++) {
|
||||||
if (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider && this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type && (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'flw' || this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'jww')) {
|
if (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider && this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type && (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'flw' || this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'jww')) {
|
||||||
let layer = this.sdk.viewer.imageryLayers._layers[i]
|
let layer = this.sdk.viewer.imageryLayers._layers[i]
|
||||||
|
@ -30,6 +30,7 @@ class GdImagery extends BaseLayer {
|
|||||||
} else {
|
} else {
|
||||||
this.entity = this.sdk.viewer.imageryLayers.addImageryProvider(gdLayer,)
|
this.entity = this.sdk.viewer.imageryLayers.addImageryProvider(gdLayer,)
|
||||||
}
|
}
|
||||||
|
this.entity._id = this.options.id
|
||||||
for (let i = 0; i < this.sdk.viewer.imageryLayers._layers.length; i++) {
|
for (let i = 0; i < this.sdk.viewer.imageryLayers._layers.length; i++) {
|
||||||
if (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider && this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type && (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'flw' || this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'jww')) {
|
if (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider && this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type && (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'flw' || this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'jww')) {
|
||||||
let layer = this.sdk.viewer.imageryLayers._layers[i]
|
let layer = this.sdk.viewer.imageryLayers._layers[i]
|
||||||
|
@ -126,6 +126,7 @@ class Layer extends BaseLayer {
|
|||||||
this.entity =
|
this.entity =
|
||||||
this.sdk.viewer.scene.imageryLayers.addImageryProvider(layer,)
|
this.sdk.viewer.scene.imageryLayers.addImageryProvider(layer,)
|
||||||
}
|
}
|
||||||
|
this.entity._id = this.options.id
|
||||||
for (let i = 0; i < this.sdk.viewer.imageryLayers._layers.length; i++) {
|
for (let i = 0; i < this.sdk.viewer.imageryLayers._layers.length; i++) {
|
||||||
if (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider && this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type && (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'flw' || this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'jww')) {
|
if (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider && this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type && (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'flw' || this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'jww')) {
|
||||||
let layer = this.sdk.viewer.imageryLayers._layers[i]
|
let layer = this.sdk.viewer.imageryLayers._layers[i]
|
||||||
|
@ -37,6 +37,7 @@ class Layer3rdparty extends BaseLayer {
|
|||||||
this.entity =
|
this.entity =
|
||||||
this.sdk.viewer.scene.imageryLayers.addImageryProvider(layer,)
|
this.sdk.viewer.scene.imageryLayers.addImageryProvider(layer,)
|
||||||
}
|
}
|
||||||
|
this.entity._id = this.options.id
|
||||||
for (let i = 0; i < this.sdk.viewer.imageryLayers._layers.length; i++) {
|
for (let i = 0; i < this.sdk.viewer.imageryLayers._layers.length; i++) {
|
||||||
if (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider && this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type && (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'flw' || this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'jww')) {
|
if (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider && this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type && (this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'flw' || this.sdk.viewer.imageryLayers._layers[i]._imageryProvider._type === 'jww')) {
|
||||||
let layer = this.sdk.viewer.imageryLayers._layers[i]
|
let layer = this.sdk.viewer.imageryLayers._layers[i]
|
||||||
|
@ -28,11 +28,11 @@ class BaseLayer extends BaseSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get layerIndex() {
|
get layerIndex() {
|
||||||
return this.entity._layerIndex
|
return this.entity ? this.entity._layerIndex : undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
get layer_index() {
|
get layer_index() {
|
||||||
return this.entity._layerIndex
|
return this.entity ? this.entity._layerIndex : undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
get brightness() {
|
get brightness() {
|
||||||
|
@ -56,7 +56,7 @@ function html(that) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<span class="label">视野缩放</span>
|
<span class="label">固定大小</span>
|
||||||
<input class="btn-switch" type="checkbox" @model="scaleByDistance">
|
<input class="btn-switch" type="checkbox" @model="scaleByDistance">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,8 +100,8 @@ class Model extends BaseModel {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -791,7 +791,7 @@ class Model extends BaseModel {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -63,9 +63,9 @@ class BillboardObject extends Base {
|
|||||||
*@param options.label {object} 标注文字的参数
|
*@param options.label {object} 标注文字的参数
|
||||||
*@param [options.label.text] {string} 标注中文字
|
*@param [options.label.text] {string} 标注中文字
|
||||||
*@param [options.label.show=true] {boolean} 标注文字显示/隐藏
|
*@param [options.label.show=true] {boolean} 标注文字显示/隐藏
|
||||||
*@param [options.label.fontFamily=0] {number} 标注文字字体 0:思源黑体;1:庞门正道标题体;2:数黑体
|
*@param [options.label.fontFamily=0] {number} 标注文字字体 0:黑体;1:思源黑体;2:庞门正道标题体;3:数黑体
|
||||||
*@param [options.label.fontSize=39] {number} 标注文字大小 单位px,微软雅黑
|
*@param [options.label.fontSize=39] {number} 标注文字大小 单位px,微软雅黑
|
||||||
*@param [options.label.color=#07f8e4] {string} 标注文字颜色
|
*@param [options.label.color=#00ffff] {string} 标注文字颜色
|
||||||
*@param _Dialog {object} 弹框事件
|
*@param _Dialog {object} 弹框事件
|
||||||
*@param _Dialog.confirmCallBack {function} 弹框确认时的回调
|
*@param _Dialog.confirmCallBack {function} 弹框确认时的回调
|
||||||
*@param _Dialog.instructSubmit(id,name,instruct) {function} 提交指令(ID, 名称,指令内容)
|
*@param _Dialog.instructSubmit(id,name,instruct) {function} 提交指令(ID, 名称,指令内容)
|
||||||
@ -107,7 +107,7 @@ class BillboardObject extends Base {
|
|||||||
: true
|
: true
|
||||||
this.options.label.fontFamily = options.label.fontFamily || 0
|
this.options.label.fontFamily = options.label.fontFamily || 0
|
||||||
this.options.label.fontSize = options.label.fontSize || 39
|
this.options.label.fontSize = options.label.fontSize || 39
|
||||||
this.options.label.color = options.label.color || '#FFFF00'
|
this.options.label.color = options.label.color || '#00ffff'
|
||||||
this.options.positions = options.positions = options.positions || {}
|
this.options.positions = options.positions = options.positions || {}
|
||||||
this.options.positions.lng = Number(
|
this.options.positions.lng = Number(
|
||||||
Number(options.positions.lng || 0).toFixed(8)
|
Number(options.positions.lng || 0).toFixed(8)
|
||||||
@ -916,7 +916,7 @@ class BillboardObject extends Base {
|
|||||||
return this.options.label.color
|
return this.options.label.color
|
||||||
}
|
}
|
||||||
set labelColor(v) {
|
set labelColor(v) {
|
||||||
this.options.label.color = v
|
this.options.label.color = v || '#00ffff'
|
||||||
this.renewPoint()
|
this.renewPoint()
|
||||||
if (this._elms.labelColor) {
|
if (this._elms.labelColor) {
|
||||||
this._elms.labelColor.forEach((item, i) => {
|
this._elms.labelColor.forEach((item, i) => {
|
||||||
@ -924,14 +924,14 @@ class BillboardObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini', //颜色box类型
|
size: 'mini', //颜色box类型
|
||||||
alpha: true, //是否开启透明度
|
alpha: true, //是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.label.color,
|
||||||
disabled: false, //是否禁止打开颜色选择器
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity', //打开颜色选择器动画
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
sure: c => {
|
sure: c => {
|
||||||
this.labelColor = c
|
this.labelColor = c
|
||||||
}, //点击确认按钮事件回调
|
}, //点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelColor = 'rgba(255,255,255,1)'
|
this.labelColor = 'rgba(0,255,255,1)'
|
||||||
} //点击清空按钮事件回调
|
} //点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelColor[i] = colorPicker
|
this._elms.labelColor[i] = colorPicker
|
||||||
@ -1812,7 +1812,13 @@ class BillboardObject extends Base {
|
|||||||
case '2':
|
case '2':
|
||||||
case 3:
|
case 3:
|
||||||
case '3':
|
case '3':
|
||||||
this.getClampToHeight(this.options.positions).then(h => {
|
let objectsToExclude = []
|
||||||
|
for (let [key, value] of this.sdk.entityMap) {
|
||||||
|
if (value.type === 'RadarScanStereoscopic' && value.entity) {
|
||||||
|
objectsToExclude.push(value.entity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.getClampToHeight(this.options.positions, objectsToExclude).then(h => {
|
||||||
this.alt = Number(h.toFixed(2))
|
this.alt = Number(h.toFixed(2))
|
||||||
heightElm.value = this.alt
|
heightElm.value = this.alt
|
||||||
})
|
})
|
||||||
@ -1876,7 +1882,13 @@ class BillboardObject extends Base {
|
|||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
case '3':
|
case '3':
|
||||||
this.getClampToHeight(this.options.positions).then(h => {
|
let objectsToExclude = []
|
||||||
|
for (let [key, value] of this.sdk.entityMap) {
|
||||||
|
if (value.type === 'RadarScanStereoscopic' && value.entity) {
|
||||||
|
objectsToExclude.push(value.entity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.getClampToHeight(this.options.positions, objectsToExclude).then(h => {
|
||||||
this.alt = Number(h.toFixed(2))
|
this.alt = Number(h.toFixed(2))
|
||||||
})
|
})
|
||||||
this.heightMode = 3
|
this.heightMode = 3
|
||||||
@ -2330,9 +2342,14 @@ class BillboardObject extends Base {
|
|||||||
this.options.positions.lat,
|
this.options.positions.lat,
|
||||||
10000000000000
|
10000000000000
|
||||||
)
|
)
|
||||||
let updatedCartesians = await this.sdk.viewer.scene.clampToHeightMostDetailed(
|
|
||||||
[point1]
|
let objectsToExclude = []
|
||||||
)
|
for (let [key, value] of this.sdk.entityMap) {
|
||||||
|
if (value.type === 'RadarScanStereoscopic' && value.entity) {
|
||||||
|
objectsToExclude.push(value.entity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let updatedCartesians = await this.sdk.viewer.scene.clampToHeightMostDetailed([point1], objectsToExclude)
|
||||||
if (updatedCartesians && updatedCartesians[0]) {
|
if (updatedCartesians && updatedCartesians[0]) {
|
||||||
height = this.cartesian3Towgs84(updatedCartesians[0], this.sdk.viewer).alt
|
height = this.cartesian3Towgs84(updatedCartesians[0], this.sdk.viewer).alt
|
||||||
}
|
}
|
||||||
@ -2471,7 +2488,13 @@ class BillboardObject extends Base {
|
|||||||
}
|
}
|
||||||
// 如果没有高度值,则获取紧贴高度计算
|
// 如果没有高度值,则获取紧贴高度计算
|
||||||
if (!position.hasOwnProperty('alt')) {
|
if (!position.hasOwnProperty('alt')) {
|
||||||
position.alt = await this.getClampToHeight(position)
|
let objectsToExclude = []
|
||||||
|
for (let [key, value] of this.sdk.entityMap) {
|
||||||
|
if (value.type === 'RadarScanStereoscopic' && value.entity) {
|
||||||
|
objectsToExclude.push(value.entity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
position.alt = await this.getClampToHeight(position, objectsToExclude)
|
||||||
}
|
}
|
||||||
lng = this.options.customView.relativePosition.lng + position.lng
|
lng = this.options.customView.relativePosition.lng + position.lng
|
||||||
lat = this.options.customView.relativePosition.lat + position.lat
|
lat = this.options.customView.relativePosition.lat + position.lat
|
||||||
@ -2482,7 +2505,13 @@ class BillboardObject extends Base {
|
|||||||
orientation: orientation
|
orientation: orientation
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
let height = await this.getClampToHeight(this.options.positions)
|
let objectsToExclude = []
|
||||||
|
for (let [key, value] of this.sdk.entityMap) {
|
||||||
|
if (value.type === 'RadarScanStereoscopic' && value.entity) {
|
||||||
|
objectsToExclude.push(value.entity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let height = await this.getClampToHeight(this.options.positions, objectsToExclude)
|
||||||
this.sdk.viewer.camera.flyTo({
|
this.sdk.viewer.camera.flyTo({
|
||||||
orientation: options.orientation,
|
orientation: options.orientation,
|
||||||
destination: Cesium.Cartesian3.fromDegrees(
|
destination: Cesium.Cartesian3.fromDegrees(
|
||||||
@ -2650,7 +2679,13 @@ class BillboardObject extends Base {
|
|||||||
}
|
}
|
||||||
// 如果没有高度值,则获取紧贴高度计算
|
// 如果没有高度值,则获取紧贴高度计算
|
||||||
if (!position.hasOwnProperty('alt')) {
|
if (!position.hasOwnProperty('alt')) {
|
||||||
position.alt = await this.getClampToHeight(position)
|
let objectsToExclude = []
|
||||||
|
for (let [key, value] of this.sdk.entityMap) {
|
||||||
|
if (value.type === 'RadarScanStereoscopic' && value.entity) {
|
||||||
|
objectsToExclude.push(value.entity)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
position.alt = await this.getClampToHeight(position, objectsToExclude)
|
||||||
}
|
}
|
||||||
relativePosition = {
|
relativePosition = {
|
||||||
lng: cameraPosition84.lng - position.lng,
|
lng: cameraPosition84.lng - position.lng,
|
||||||
|
@ -75,8 +75,8 @@ class CircleDiffuse extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -573,7 +573,7 @@ class CircleDiffuse extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -23,7 +23,7 @@ class CircleObject extends Base {
|
|||||||
* @param options.id {string} 标注id
|
* @param options.id {string} 标注id
|
||||||
* @param options.name {string} 名称
|
* @param options.name {string} 名称
|
||||||
* @param options.show=true {boolean} 显示/隐藏
|
* @param options.show=true {boolean} 显示/隐藏
|
||||||
* @param options.color="#36c4ff" {string} 颜色
|
* @param options.color="#ff000080" {string} 颜色
|
||||||
* @param options.center {object} 位置
|
* @param options.center {object} 位置
|
||||||
* @param options.center.lng {object} 经度
|
* @param options.center.lng {object} 经度
|
||||||
* @param options.center.lat {object} 纬度
|
* @param options.center.lat {object} 纬度
|
||||||
@ -31,21 +31,21 @@ class CircleObject extends Base {
|
|||||||
* @param options.radius=10 {object}半径
|
* @param options.radius=10 {object}半径
|
||||||
* @param options.line {object} 边框
|
* @param options.line {object} 边框
|
||||||
* @param options.line.width=2 {string} 边框宽
|
* @param options.line.width=2 {string} 边框宽
|
||||||
* @param options.line.color="rgba(155, 155, 124, 0.89)" {string} 边框颜色
|
* @param options.line.color="#ff000080" {string} 边框颜色
|
||||||
* @param options.label {object} 标注
|
* @param options.label {object} 标注
|
||||||
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
||||||
*/
|
*/
|
||||||
constructor(sdk, options = {}) {
|
constructor(sdk, options = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.color = options.color || "#36c4ff"
|
this.options.color = options.color || "#ff000080"
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
this.options.radius = (options.radius || options.radius === 0) ? options.radius : 10
|
this.options.radius = (options.radius || options.radius === 0) ? options.radius : 10
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options.center = options.center || {}
|
this.options.center = options.center || {}
|
||||||
this.options.line = options.line || {}
|
this.options.line = options.line || {}
|
||||||
this.options.line.width = this.options.line.width || 2
|
this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3)
|
||||||
this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)'
|
this.options.line.color = this.options.line.color || '#ff000080'
|
||||||
this.options['area-unit'] = options['area-unit'] || '平方米'
|
this.options['area-unit'] = options['area-unit'] || '平方米'
|
||||||
options.label = options.label || {}
|
options.label = options.label || {}
|
||||||
this._elms = {};
|
this._elms = {};
|
||||||
@ -58,8 +58,8 @@ class CircleObject extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -216,14 +216,14 @@ class CircleObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let material = Cesium.Color.fromCssColorString(v)
|
let material = Cesium.Color.fromCssColorString(this.options.color)
|
||||||
if (this.sdk.viewer.scene.mode === 2) {
|
if (this.sdk.viewer.scene.mode === 2) {
|
||||||
material = new Cesium.CustomColorMaterialSource({
|
material = new Cesium.CustomColorMaterialSource({
|
||||||
color: v
|
color: this.options.color
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.entity.polygon.material = material
|
this.entity.polygon.material = material
|
||||||
@ -233,14 +233,14 @@ class CircleObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.color = c
|
this.color = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.color = 'rgba(255,255,255,1)'
|
this.color = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.color[i] = colorPicker
|
this._elms.color[i] = colorPicker
|
||||||
@ -252,25 +252,25 @@ class CircleObject extends Base {
|
|||||||
return this.options.line.color
|
return this.options.line.color
|
||||||
}
|
}
|
||||||
set lineColor(v) {
|
set lineColor(v) {
|
||||||
this.options.line.color = v
|
this.options.line.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.entity.polyline.material = Cesium.Color.fromCssColorString(v)
|
this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color)
|
||||||
if (this._elms.lineColor) {
|
if (this._elms.lineColor) {
|
||||||
this._elms.lineColor.forEach((item, i) => {
|
this._elms.lineColor.forEach((item, i) => {
|
||||||
let lineColorPicker = new ewPlugins('colorpicker', {
|
let lineColorPicker = new ewPlugins('colorpicker', {
|
||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.line.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.lineColor = c
|
this.lineColor = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.lineColor = 'rgba(255,255,255,1)'
|
this.lineColor = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.lineColor[i] = lineColorPicker
|
this._elms.lineColor[i] = lineColorPicker
|
||||||
@ -282,8 +282,8 @@ class CircleObject extends Base {
|
|||||||
return this.options.line.width
|
return this.options.line.width
|
||||||
}
|
}
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.line.width = v
|
this.options.line.width = ((v || v === 0) ? v : 3)
|
||||||
this.entity.polyline.width = v
|
this.entity.polyline.width = this.options.line.width
|
||||||
this._elms.lineWidth && this._elms.lineWidth.forEach((item) => {
|
this._elms.lineWidth && this._elms.lineWidth.forEach((item) => {
|
||||||
item.value = v
|
item.value = v
|
||||||
})
|
})
|
||||||
@ -478,7 +478,7 @@ class CircleObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -24,8 +24,8 @@ class CurvelineObject extends Base {
|
|||||||
* @description 折线
|
* @description 折线
|
||||||
* @param options {object} 线属性
|
* @param options {object} 线属性
|
||||||
* @param options.name{string} 名称
|
* @param options.name{string} 名称
|
||||||
* @param options.width=5{number} 线宽
|
* @param options.width=3{number} 线宽
|
||||||
* @param options.color=#0df89e {string} 颜色
|
* @param options.color=#ff0000 {string} 颜色
|
||||||
* @param options.type=0 {number} 材质类型 0-实线 1-虚线 2-泛光
|
* @param options.type=0 {number} 材质类型 0-实线 1-虚线 2-泛光
|
||||||
* @param options.heightMode{number} 高度模式(0:海拔高度;1:相对高度;2:依附模式)
|
* @param options.heightMode{number} 高度模式(0:海拔高度;1:相对高度;2:依附模式)
|
||||||
* @param options['nose-to-tail']=false {boolean} 首尾相连
|
* @param options['nose-to-tail']=false {boolean} 首尾相连
|
||||||
@ -51,8 +51,8 @@ class CurvelineObject extends Base {
|
|||||||
constructor(sdk, options = {}, _Dialog = {}) {
|
constructor(sdk, options = {}, _Dialog = {}) {
|
||||||
super(sdk, options)
|
super(sdk, options)
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.width = options.width || 10
|
this.options.width = ((options.width || options.width === 0) ? options.width : 3)
|
||||||
this.options.color = options.color || '#0df89e'
|
this.options.color = options.color || '#ff0000'
|
||||||
this.options.type = options.type ? Number(options.type) : 0
|
this.options.type = options.type ? Number(options.type) : 0
|
||||||
this.options['nose-to-tail'] = options['nose-to-tail'] || false
|
this.options['nose-to-tail'] = options['nose-to-tail'] || false
|
||||||
this.options.extend = options.extend || false
|
this.options.extend = options.extend || false
|
||||||
@ -86,8 +86,8 @@ class CurvelineObject extends Base {
|
|||||||
options.label.pixelOffset || options.label.pixelOffset === 0
|
options.label.pixelOffset || options.label.pixelOffset === 0
|
||||||
? options.label.pixelOffset
|
? options.label.pixelOffset
|
||||||
: 20,
|
: 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near:
|
near:
|
||||||
options.label.near || options.label.near === 0
|
options.label.near || options.label.near === 0
|
||||||
@ -143,7 +143,7 @@ class CurvelineObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff0000'
|
||||||
this.entity.polyline.material = this.getMaterial(v, this.options.type)
|
this.entity.polyline.material = this.getMaterial(v, this.options.type)
|
||||||
if (this._elms.color) {
|
if (this._elms.color) {
|
||||||
this._elms.color.forEach((item, i) => {
|
this._elms.color.forEach((item, i) => {
|
||||||
@ -151,14 +151,14 @@ class CurvelineObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini', //颜色box类型
|
size: 'mini', //颜色box类型
|
||||||
alpha: true, //是否开启透明度
|
alpha: true, //是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false, //是否禁止打开颜色选择器
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity', //打开颜色选择器动画
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
sure: c => {
|
sure: c => {
|
||||||
this.color = c
|
this.color = c
|
||||||
}, //点击确认按钮事件回调
|
}, //点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.color = 'rgba(255,255,255,1)'
|
this.color = 'rgba(255,0,0,1)'
|
||||||
} //点击清空按钮事件回调
|
} //点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.color[i] = colorPicker
|
this._elms.color[i] = colorPicker
|
||||||
@ -243,10 +243,10 @@ class CurvelineObject extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.width = v
|
this.options.width = (v || v == 0) ? v : 3
|
||||||
this._elms.lineWidth &&
|
this._elms.lineWidth &&
|
||||||
this._elms.lineWidth.forEach(item => {
|
this._elms.lineWidth.forEach(item => {
|
||||||
item.value = v
|
item.value = this.options.width
|
||||||
})
|
})
|
||||||
this.entity &&
|
this.entity &&
|
||||||
this.entity.polyline &&
|
this.entity.polyline &&
|
||||||
@ -623,7 +623,7 @@ class CurvelineObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
}, //点击确认按钮事件回调
|
}, //点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
} //点击清空按钮事件回调
|
} //点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* 圆
|
* 椭圆
|
||||||
*/
|
*/
|
||||||
import Dialog from '../../Element/Dialog';
|
import Dialog from '../../Element/Dialog';
|
||||||
import cy_tabs from "../../Element/cy_html_tabs";
|
import cy_tabs from "../../Element/cy_html_tabs";
|
||||||
@ -24,7 +24,7 @@ class EllipseObject extends Base {
|
|||||||
* @param options.name {string} 名称
|
* @param options.name {string} 名称
|
||||||
* @param options.show=true {boolean} 显示/隐藏
|
* @param options.show=true {boolean} 显示/隐藏
|
||||||
* @param options.center {object} 位置
|
* @param options.center {object} 位置
|
||||||
* @param options.color="#36c4ff" {string} 颜色
|
* @param options.color="#ff000080" {string} 颜色
|
||||||
* @param options.center.lng {object} 经度
|
* @param options.center.lng {object} 经度
|
||||||
* @param options.center.lat {object} 维度
|
* @param options.center.lat {object} 维度
|
||||||
* @param options.semiMinorAxis=10 {number} 短半轴长度
|
* @param options.semiMinorAxis=10 {number} 短半轴长度
|
||||||
@ -32,22 +32,22 @@ class EllipseObject extends Base {
|
|||||||
* @param options.bearing=0 {number} 旋转角度
|
* @param options.bearing=0 {number} 旋转角度
|
||||||
* @param options.line {object} 边框
|
* @param options.line {object} 边框
|
||||||
* @param options.line.width=2 {string} 边框宽
|
* @param options.line.width=2 {string} 边框宽
|
||||||
* @param options.line.color="rgba(155, 155, 124, 0.89)" {string} 边框颜色
|
* @param options.line.color="#ff000080" {string} 边框颜色
|
||||||
* @param options.label {object} 标注
|
* @param options.label {object} 标注
|
||||||
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
||||||
*/
|
*/
|
||||||
constructor(sdk, options = {}) {
|
constructor(sdk, options = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.color = options.color || "#36c4ff"
|
this.options.color = options.color || "#ff000080"
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
this.options.semiMinorAxis = (options.semiMinorAxis || options.semiMinorAxis === 0) ? options.semiMinorAxis : 10
|
this.options.semiMinorAxis = (options.semiMinorAxis || options.semiMinorAxis === 0) ? options.semiMinorAxis : 10
|
||||||
this.options.semiMajorAxis = (options.semiMajorAxis || options.semiMajorAxis === 0) ? options.semiMajorAxis : 20
|
this.options.semiMajorAxis = (options.semiMajorAxis || options.semiMajorAxis === 0) ? options.semiMajorAxis : 20
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options.center = options.center || {}
|
this.options.center = options.center || {}
|
||||||
this.options.line = options.line || {}
|
this.options.line = options.line || {}
|
||||||
this.options.line.width = this.options.line.width || 2
|
this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3)
|
||||||
this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)'
|
this.options.line.color = this.options.line.color || '#ff000080'
|
||||||
this.options['area-unit'] = options['area-unit'] || '平方米'
|
this.options['area-unit'] = options['area-unit'] || '平方米'
|
||||||
options.label = options.label || {}
|
options.label = options.label || {}
|
||||||
this._elms = {};
|
this._elms = {};
|
||||||
@ -60,8 +60,8 @@ class EllipseObject extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -229,14 +229,14 @@ class EllipseObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let material = Cesium.Color.fromCssColorString(v)
|
let material = Cesium.Color.fromCssColorString(this.options.color)
|
||||||
if (this.sdk.viewer.scene.mode === 2) {
|
if (this.sdk.viewer.scene.mode === 2) {
|
||||||
material = new Cesium.CustomColorMaterialSource({
|
material = new Cesium.CustomColorMaterialSource({
|
||||||
color: v
|
color: this.options.color
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.entity.polygon.material = material
|
this.entity.polygon.material = material
|
||||||
@ -247,14 +247,14 @@ class EllipseObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.color = c
|
this.color = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.color = 'rgba(255,255,255,1)'
|
this.color = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.color[i] = colorPicker
|
this._elms.color[i] = colorPicker
|
||||||
@ -266,25 +266,25 @@ class EllipseObject extends Base {
|
|||||||
return this.options.line.color
|
return this.options.line.color
|
||||||
}
|
}
|
||||||
set lineColor(v) {
|
set lineColor(v) {
|
||||||
this.options.line.color = v
|
this.options.line.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.entity.polyline.material = Cesium.Color.fromCssColorString(v)
|
this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color)
|
||||||
if (this._elms.lineColor) {
|
if (this._elms.lineColor) {
|
||||||
this._elms.lineColor.forEach((item, i) => {
|
this._elms.lineColor.forEach((item, i) => {
|
||||||
let lineColorPicker = new ewPlugins('colorpicker', {
|
let lineColorPicker = new ewPlugins('colorpicker', {
|
||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.line.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.lineColor = c
|
this.lineColor = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.lineColor = 'rgba(255,255,255,1)'
|
this.lineColor = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.lineColor[i] = lineColorPicker
|
this._elms.lineColor[i] = lineColorPicker
|
||||||
@ -296,10 +296,10 @@ class EllipseObject extends Base {
|
|||||||
return this.options.line.width
|
return this.options.line.width
|
||||||
}
|
}
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.line.width = v
|
this.options.line.width = ((v || v === 0) ? v : 3)
|
||||||
this.entity.polyline.width = v
|
this.entity.polyline.width = this.options.line.width
|
||||||
this._elms.lineWidth && this._elms.lineWidth.forEach((item) => {
|
this._elms.lineWidth && this._elms.lineWidth.forEach((item) => {
|
||||||
item.value = v
|
item.value = this.options.line.width
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -492,7 +492,7 @@ class EllipseObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -34,10 +34,10 @@ class LabelObject extends Base {
|
|||||||
}
|
}
|
||||||
this.options.text = textArray.join('\n')
|
this.options.text = textArray.join('\n')
|
||||||
this.options.fontFamily = options.fontFamily || 0
|
this.options.fontFamily = options.fontFamily || 0
|
||||||
this.font = getFontFamily(this.options.fontFamily) || 'Helvetica'
|
this.font = getFontFamily(this.options.fontFamily) || 'SimHei'
|
||||||
this.options.fontSize = options.fontSize || 20
|
this.options.fontSize = options.fontSize || 20
|
||||||
this.options.lineWidth = options.lineWidth || 4
|
this.options.lineWidth = options.lineWidth || 4
|
||||||
this.options.lineColor = options.lineColor || '#fff000'
|
this.options.lineColor = options.lineColor || '#00ffff80'
|
||||||
this.options.color = options.color || '#ffffff'
|
this.options.color = options.color || '#ffffff'
|
||||||
this.options.ground =
|
this.options.ground =
|
||||||
options.ground || options.ground === false ? options.ground : true
|
options.ground || options.ground === false ? options.ground : true
|
||||||
@ -46,8 +46,8 @@ class LabelObject extends Base {
|
|||||||
? options.pixelOffset
|
? options.pixelOffset
|
||||||
: 20
|
: 20
|
||||||
this.options.backgroundColor = options.backgroundColor || [
|
this.options.backgroundColor = options.backgroundColor || [
|
||||||
'#42c6ef',
|
'#00ffff80',
|
||||||
'#42c6ef'
|
'#00ffff80'
|
||||||
]
|
]
|
||||||
this.event = new MouseEvent(this.sdk)
|
this.event = new MouseEvent(this.sdk)
|
||||||
this.entity
|
this.entity
|
||||||
@ -407,7 +407,7 @@ class LabelObject extends Base {
|
|||||||
|
|
||||||
set fontFamily(v) {
|
set fontFamily(v) {
|
||||||
this.options.fontFamily = v || 0
|
this.options.fontFamily = v || 0
|
||||||
this.font = getFontFamily(this.options.fontFamily) || 'Helvetica'
|
this.font = getFontFamily(this.options.fontFamily) || 'SimHei'
|
||||||
this.updateBillboardImage()
|
this.updateBillboardImage()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ class LabelObject extends Base {
|
|||||||
return this.options.lineWidth
|
return this.options.lineWidth
|
||||||
}
|
}
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.lineWidth = Number(v)
|
this.options.lineWidth = ((Number(v) || Number(v) === 0) ? Number(v) : 4)
|
||||||
if (!this.entity) {
|
if (!this.entity) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -443,7 +443,7 @@ class LabelObject extends Base {
|
|||||||
return this.options.pixelOffset
|
return this.options.pixelOffset
|
||||||
}
|
}
|
||||||
set lineColor(v) {
|
set lineColor(v) {
|
||||||
this.options.lineColor = v
|
this.options.lineColor = v || '#00ffff80'
|
||||||
if (!this.entity) {
|
if (!this.entity) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ class PincerArrowObject extends Base {
|
|||||||
* @param options {object} 属性
|
* @param options {object} 属性
|
||||||
* @param options.show=true {boolean} 显示/隐藏
|
* @param options.show=true {boolean} 显示/隐藏
|
||||||
* @param options.name {string} 名称
|
* @param options.name {string} 名称
|
||||||
* @param options.color="#36c4ff" {string} 颜色
|
* @param options.color="#ff000080" {string} 颜色
|
||||||
* @param options.height {number} 高度
|
* @param options.height {number} 高度
|
||||||
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
||||||
* @param {Array.<object>} options.positions 坐标数组 [{lon,lat,alt},...]
|
* @param {Array.<object>} options.positions 坐标数组 [{lon,lat,alt},...]
|
||||||
@ -34,13 +34,13 @@ class PincerArrowObject extends Base {
|
|||||||
constructor(sdk, options = {}, _Dialog = {}) {
|
constructor(sdk, options = {}, _Dialog = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.color = options.color || "#36c4ff"
|
this.options.color = options.color || "#ff000080"
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options.positions = options.positions || []
|
this.options.positions = options.positions || []
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
this.options.line = options.line || {}
|
this.options.line = options.line || {}
|
||||||
this.options.line.width = this.options.line.width || 2
|
this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3)
|
||||||
this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)'
|
this.options.line.color = this.options.line.color || '#ff000080'
|
||||||
this.options['area-unit'] = options['area-unit'] || '平方米'
|
this.options['area-unit'] = options['area-unit'] || '平方米'
|
||||||
this.options.height = options.height
|
this.options.height = options.height
|
||||||
this.options.loop = options.loop || false
|
this.options.loop = options.loop || false
|
||||||
@ -62,8 +62,8 @@ class PincerArrowObject extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -122,14 +122,14 @@ class PincerArrowObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let material = Cesium.Color.fromCssColorString(v)
|
let material = Cesium.Color.fromCssColorString(this.options.color)
|
||||||
if (this.sdk.viewer.scene.mode === 2) {
|
if (this.sdk.viewer.scene.mode === 2) {
|
||||||
material = new Cesium.CustomColorMaterialSource({
|
material = new Cesium.CustomColorMaterialSource({
|
||||||
color: v
|
color: this.options.color
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.entity.polygon.material = material
|
this.entity.polygon.material = material
|
||||||
@ -139,14 +139,14 @@ class PincerArrowObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.color = c
|
this.color = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.color = 'rgba(255,255,255,1)'
|
this.color = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.color[i] = colorPicker
|
this._elms.color[i] = colorPicker
|
||||||
@ -253,25 +253,25 @@ class PincerArrowObject extends Base {
|
|||||||
return this.options.line.color
|
return this.options.line.color
|
||||||
}
|
}
|
||||||
set lineColor(v) {
|
set lineColor(v) {
|
||||||
this.options.line.color = v
|
this.options.line.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.entity.polyline.material = Cesium.Color.fromCssColorString(v)
|
this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color)
|
||||||
if (this._elms.lineColor) {
|
if (this._elms.lineColor) {
|
||||||
this._elms.lineColor.forEach((item, i) => {
|
this._elms.lineColor.forEach((item, i) => {
|
||||||
let lineColorPicker = new ewPlugins('colorpicker', {
|
let lineColorPicker = new ewPlugins('colorpicker', {
|
||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.line.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.lineColor = c
|
this.lineColor = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.lineColor = 'rgba(255,255,255,1)'
|
this.lineColor = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.lineColor[i] = lineColorPicker
|
this._elms.lineColor[i] = lineColorPicker
|
||||||
@ -283,10 +283,10 @@ class PincerArrowObject extends Base {
|
|||||||
return this.options.line.width
|
return this.options.line.width
|
||||||
}
|
}
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.line.width = v
|
this.options.line.width = ((v || v === 0) ? v : 3)
|
||||||
this.entity.polyline.width = v
|
this.entity.polyline.width = this.options.line.width
|
||||||
this._elms.lineWidth && this._elms.lineWidth.forEach((item) => {
|
this._elms.lineWidth && this._elms.lineWidth.forEach((item) => {
|
||||||
item.value = v
|
item.value = this.options.line.width
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -479,7 +479,7 @@ class PincerArrowObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -25,7 +25,7 @@ class PolygonObject extends Base {
|
|||||||
* @param options.id {string} 唯一标识
|
* @param options.id {string} 唯一标识
|
||||||
* @param options.show=true {boolean} 显示/隐藏
|
* @param options.show=true {boolean} 显示/隐藏
|
||||||
* @param options.name {string} 名称
|
* @param options.name {string} 名称
|
||||||
* @param options.color="#36c4ff" {string} 颜色
|
* @param options.color="#ff000080" {string} 颜色
|
||||||
* @param options.height {number} 高度
|
* @param options.height {number} 高度
|
||||||
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
||||||
* @param options.line {object} 边框
|
* @param options.line {object} 边框
|
||||||
@ -39,15 +39,15 @@ class PolygonObject extends Base {
|
|||||||
constructor(sdk, options = {}, _Dialog = {}) {
|
constructor(sdk, options = {}, _Dialog = {}) {
|
||||||
super(sdk, options)
|
super(sdk, options)
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.color = options.color || '#36c4ff'
|
this.options.color = options.color || '#ff000080'
|
||||||
this.options.show =
|
this.options.show =
|
||||||
options.show || options.show === false ? options.show : true
|
options.show || options.show === false ? options.show : true
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
this.options.positions = options.positions || []
|
this.options.positions = options.positions || []
|
||||||
this.options.line = options.line || {}
|
this.options.line = options.line || {}
|
||||||
this.options.line.width = this.options.line.width || 2
|
this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3)
|
||||||
this.options.line.color =
|
this.options.line.color =
|
||||||
this.options.line.color || 'rgba(155, 155, 124, 0.89)'
|
this.options.line.color || '#ff000080'
|
||||||
this.options['area-unit'] = options['area-unit'] || '平方米'
|
this.options['area-unit'] = options['area-unit'] || '平方米'
|
||||||
this.entity
|
this.entity
|
||||||
this.event = new MouseEvent(this.sdk)
|
this.event = new MouseEvent(this.sdk)
|
||||||
@ -74,8 +74,8 @@ class PolygonObject extends Base {
|
|||||||
options.label.pixelOffset || options.label.pixelOffset === 0
|
options.label.pixelOffset || options.label.pixelOffset === 0
|
||||||
? options.label.pixelOffset
|
? options.label.pixelOffset
|
||||||
: 20,
|
: 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near:
|
near:
|
||||||
options.label.near || options.label.near === 0
|
options.label.near || options.label.near === 0
|
||||||
@ -133,18 +133,18 @@ class PolygonObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let material = Cesium.Color.fromCssColorString(v)
|
let material = Cesium.Color.fromCssColorString(this.options.color)
|
||||||
if (this.sdk.viewer.scene.mode === 2) {
|
if (this.sdk.viewer.scene.mode === 2) {
|
||||||
this.heightMode = 0
|
this.heightMode = 0
|
||||||
material = new Cesium.CustomColorMaterialSource({
|
material = new Cesium.CustomColorMaterialSource({
|
||||||
color: v
|
color: this.options.color
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.entity.polygon.material = material
|
this.entity.polygon.material = material
|
||||||
@ -154,14 +154,14 @@ class PolygonObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini', //颜色box类型
|
size: 'mini', //颜色box类型
|
||||||
alpha: true, //是否开启透明度
|
alpha: true, //是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false, //是否禁止打开颜色选择器
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity', //打开颜色选择器动画
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
sure: c => {
|
sure: c => {
|
||||||
this.color = c
|
this.color = c
|
||||||
}, //点击确认按钮事件回调
|
}, //点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.color = 'rgba(255,255,255,1)'
|
this.color = 'rgba(255,0,0,0.5)'
|
||||||
} //点击清空按钮事件回调
|
} //点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.color[i] = colorPicker
|
this._elms.color[i] = colorPicker
|
||||||
@ -269,25 +269,25 @@ class PolygonObject extends Base {
|
|||||||
return this.options.line.color
|
return this.options.line.color
|
||||||
}
|
}
|
||||||
set lineColor(v) {
|
set lineColor(v) {
|
||||||
this.options.line.color = v
|
this.options.line.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.entity.polyline.material = Cesium.Color.fromCssColorString(v)
|
this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color)
|
||||||
if (this._elms.lineColor) {
|
if (this._elms.lineColor) {
|
||||||
this._elms.lineColor.forEach((item, i) => {
|
this._elms.lineColor.forEach((item, i) => {
|
||||||
let lineColorPicker = new ewPlugins('colorpicker', {
|
let lineColorPicker = new ewPlugins('colorpicker', {
|
||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini', //颜色box类型
|
size: 'mini', //颜色box类型
|
||||||
alpha: true, //是否开启透明度
|
alpha: true, //是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.line.color,
|
||||||
disabled: false, //是否禁止打开颜色选择器
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity', //打开颜色选择器动画
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
sure: c => {
|
sure: c => {
|
||||||
this.lineColor = c
|
this.lineColor = c
|
||||||
}, //点击确认按钮事件回调
|
}, //点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.lineColor = 'rgba(255,255,255,1)'
|
this.lineColor = 'rgba(255,0,0,0.5)'
|
||||||
} //点击清空按钮事件回调
|
} //点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.lineColor[i] = lineColorPicker
|
this._elms.lineColor[i] = lineColorPicker
|
||||||
@ -299,8 +299,8 @@ class PolygonObject extends Base {
|
|||||||
return this.options.line.width
|
return this.options.line.width
|
||||||
}
|
}
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.line.width = v
|
this.options.line.width = ((v || v === 0) ? v : 3)
|
||||||
this.entity.polyline.width = v
|
this.entity.polyline.width = this.options.line.width
|
||||||
this._elms.lineWidth &&
|
this._elms.lineWidth &&
|
||||||
this._elms.lineWidth.forEach(item => {
|
this._elms.lineWidth.forEach(item => {
|
||||||
item.value = v
|
item.value = v
|
||||||
@ -504,7 +504,7 @@ class PolygonObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
}, //点击确认按钮事件回调
|
}, //点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
} //点击清空按钮事件回调
|
} //点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -24,7 +24,7 @@ class PolyhedronObject extends Base {
|
|||||||
* @param options.id {string} 唯一标识
|
* @param options.id {string} 唯一标识
|
||||||
* @param options.show=true {boolean} 显示/隐藏
|
* @param options.show=true {boolean} 显示/隐藏
|
||||||
* @param options.name {string} 名称
|
* @param options.name {string} 名称
|
||||||
* @param options.color="#0df7f8" {string} 颜色
|
* @param options.color="#ff0000" {string} 颜色
|
||||||
* @param options.height=10 {number} 高
|
* @param options.height=10 {number} 高
|
||||||
* @param {Array.<object>} options.positions 经纬度和高度的列表,值交替 [{lon,lat,alt},...]
|
* @param {Array.<object>} options.positions 经纬度和高度的列表,值交替 [{lon,lat,alt},...]
|
||||||
* @param _Dialog {object} 弹框事件
|
* @param _Dialog {object} 弹框事件
|
||||||
@ -32,7 +32,7 @@ class PolyhedronObject extends Base {
|
|||||||
* */
|
* */
|
||||||
constructor(sdk, options = {}, _Dialog = {}) {
|
constructor(sdk, options = {}, _Dialog = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.color = options.color || "#0df7f8"
|
this.options.color = options.color || "#ff0000"
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options.height = (options.height || options.height === 0) ? options.height : 10
|
this.options.height = (options.height || options.height === 0) ? options.height : 10
|
||||||
if (this.options.height <= 0.01) {
|
if (this.options.height <= 0.01) {
|
||||||
@ -54,8 +54,8 @@ class PolyhedronObject extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -381,7 +381,7 @@ class PolyhedronObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff0000'
|
||||||
if(!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if(!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -398,7 +398,7 @@ class PolyhedronObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
@ -662,7 +662,7 @@ class PolyhedronObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -53,8 +53,8 @@ class PolyhedronObject extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -599,7 +599,7 @@ class PolyhedronObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -24,8 +24,8 @@ class PolylineObject extends Base {
|
|||||||
* @description 折线
|
* @description 折线
|
||||||
* @param options {object} 线属性
|
* @param options {object} 线属性
|
||||||
* @param options.name{string} 名称
|
* @param options.name{string} 名称
|
||||||
* @param options.width=5{number} 线宽
|
* @param options.width=3{number} 线宽
|
||||||
* @param options.color=#0df89e {string} 颜色
|
* @param options.color=#ff0000 {string} 颜色
|
||||||
* @param options.type=0 {number} 材质类型 0-实线 1-虚线 2-泛光
|
* @param options.type=0 {number} 材质类型 0-实线 1-虚线 2-泛光
|
||||||
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对高度;2:依附模式)
|
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对高度;2:依附模式)
|
||||||
* @param options['nose-to-tail']=false {boolean} 首尾相连
|
* @param options['nose-to-tail']=false {boolean} 首尾相连
|
||||||
@ -52,8 +52,8 @@ class PolylineObject extends Base {
|
|||||||
constructor(sdk, options = {}, _Dialog = {}) {
|
constructor(sdk, options = {}, _Dialog = {}) {
|
||||||
super(sdk, options)
|
super(sdk, options)
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.width = options.width || 10
|
this.options.width = ((options.width || options.width === 0) ? options.width : 3)
|
||||||
this.options.color = options.color || '#0df89e'
|
this.options.color = options.color || '#ff0000'
|
||||||
this.options.type = options.type ? Number(options.type) : 0
|
this.options.type = options.type ? Number(options.type) : 0
|
||||||
this.options['nose-to-tail'] = options['nose-to-tail'] || false
|
this.options['nose-to-tail'] = options['nose-to-tail'] || false
|
||||||
this.options.smooth = options.smooth || false
|
this.options.smooth = options.smooth || false
|
||||||
@ -88,8 +88,8 @@ class PolylineObject extends Base {
|
|||||||
options.label.pixelOffset || options.label.pixelOffset === 0
|
options.label.pixelOffset || options.label.pixelOffset === 0
|
||||||
? options.label.pixelOffset
|
? options.label.pixelOffset
|
||||||
: 20,
|
: 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near:
|
near:
|
||||||
options.label.near || options.label.near === 0
|
options.label.near || options.label.near === 0
|
||||||
@ -145,22 +145,22 @@ class PolylineObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff0000'
|
||||||
this.entity.polyline.material = this.getMaterial(v, this.options.type)
|
this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type)
|
||||||
if (this._elms.color) {
|
if (this._elms.color) {
|
||||||
this._elms.color.forEach((item, i) => {
|
this._elms.color.forEach((item, i) => {
|
||||||
let colorPicker = new ewPlugins('colorpicker', {
|
let colorPicker = new ewPlugins('colorpicker', {
|
||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini', //颜色box类型
|
size: 'mini', //颜色box类型
|
||||||
alpha: true, //是否开启透明度
|
alpha: true, //是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false, //是否禁止打开颜色选择器
|
disabled: false, //是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity', //打开颜色选择器动画
|
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||||
sure: c => {
|
sure: c => {
|
||||||
this.color = c
|
this.color = c
|
||||||
}, //点击确认按钮事件回调
|
}, //点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.color = 'rgba(255,255,255,1)'
|
this.color = 'rgba(255,0,0,1)'
|
||||||
} //点击清空按钮事件回调
|
} //点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.color[i] = colorPicker
|
this._elms.color[i] = colorPicker
|
||||||
@ -245,10 +245,10 @@ class PolylineObject extends Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.width = v
|
this.options.width = (v || v == 0) ? v : 3
|
||||||
this._elms.lineWidth &&
|
this._elms.lineWidth &&
|
||||||
this._elms.lineWidth.forEach(item => {
|
this._elms.lineWidth.forEach(item => {
|
||||||
item.value = v
|
item.value = this.options.width
|
||||||
})
|
})
|
||||||
this.entity &&
|
this.entity &&
|
||||||
this.entity.polyline &&
|
this.entity.polyline &&
|
||||||
@ -645,7 +645,7 @@ class PolylineObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
}, //点击确认按钮事件回调
|
}, //点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
} //点击清空按钮事件回调
|
} //点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -53,8 +53,8 @@ class RadarScan extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -594,7 +594,7 @@ class RadarScan extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -58,8 +58,8 @@ class RadarScanStereoscopic extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -86,6 +86,10 @@ class RadarScanStereoscopic extends Base {
|
|||||||
RadarScanStereoscopic.radarSolidScan(this)
|
RadarScanStereoscopic.radarSolidScan(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get type() {
|
||||||
|
return 'RadarScanStereoscopic'
|
||||||
|
}
|
||||||
|
|
||||||
static radarSolidScan(that) {
|
static radarSolidScan(that) {
|
||||||
let viewer = that.sdk.viewer
|
let viewer = that.sdk.viewer
|
||||||
let options = that.options
|
let options = that.options
|
||||||
@ -565,7 +569,7 @@ class RadarScanStereoscopic extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -23,7 +23,7 @@ class SectorObject extends Base {
|
|||||||
* @param options.id {string} 标注id
|
* @param options.id {string} 标注id
|
||||||
* @param options.name {string} 名称
|
* @param options.name {string} 名称
|
||||||
* @param options.show=true {boolean} 显示/隐藏
|
* @param options.show=true {boolean} 显示/隐藏
|
||||||
* @param options.color="#36c4ff" {string} 颜色
|
* @param options.color="#ff000080" {string} 颜色
|
||||||
* @param options.center {object} 位置
|
* @param options.center {object} 位置
|
||||||
* @param options.center.lng {object} 经度
|
* @param options.center.lng {object} 经度
|
||||||
* @param options.center.lat {object} 维度
|
* @param options.center.lat {object} 维度
|
||||||
@ -31,7 +31,7 @@ class SectorObject extends Base {
|
|||||||
* @param options.startAngle=10 {number} 起始方向
|
* @param options.startAngle=10 {number} 起始方向
|
||||||
* @param options.endAngle=0 {number} 结束方向
|
* @param options.endAngle=0 {number} 结束方向
|
||||||
* @param options.line {object} 边框
|
* @param options.line {object} 边框
|
||||||
* @param options.line.width=2 {string} 边框宽
|
* @param options.line.width=3 {string} 边框宽
|
||||||
* @param options.line.color="rgba(155, 155, 124, 0.89)" {string} 边框颜色
|
* @param options.line.color="rgba(155, 155, 124, 0.89)" {string} 边框颜色
|
||||||
* @param options.label {object} 标注
|
* @param options.label {object} 标注
|
||||||
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
||||||
@ -39,15 +39,15 @@ class SectorObject extends Base {
|
|||||||
constructor(sdk, options = {}) {
|
constructor(sdk, options = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.color = options.color || "#36c4ff"
|
this.options.color = options.color || "#ff000080"
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
this.options.semiMinorAxis = (options.semiMinorAxis || options.semiMinorAxis === 0) ? options.semiMinorAxis : 10
|
this.options.semiMinorAxis = (options.semiMinorAxis || options.semiMinorAxis === 0) ? options.semiMinorAxis : 10
|
||||||
this.options.semiMajorAxis = (options.semiMajorAxis || options.semiMajorAxis === 0) ? options.semiMajorAxis : 20
|
this.options.semiMajorAxis = (options.semiMajorAxis || options.semiMajorAxis === 0) ? options.semiMajorAxis : 20
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options.center = options.center || {}
|
this.options.center = options.center || {}
|
||||||
this.options.line = options.line || {}
|
this.options.line = options.line || {}
|
||||||
this.options.line.width = this.options.line.width || 2
|
this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3)
|
||||||
this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)'
|
this.options.line.color = this.options.line.color || '#ff000080'
|
||||||
this.options['area-unit'] = options['area-unit'] || '平方米'
|
this.options['area-unit'] = options['area-unit'] || '平方米'
|
||||||
options.label = options.label || {}
|
options.label = options.label || {}
|
||||||
this._elms = {};
|
this._elms = {};
|
||||||
@ -60,8 +60,8 @@ class SectorObject extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -226,14 +226,14 @@ class SectorObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let material = Cesium.Color.fromCssColorString(v)
|
let material = Cesium.Color.fromCssColorString(this.options.color)
|
||||||
if (this.sdk.viewer.scene.mode === 2) {
|
if (this.sdk.viewer.scene.mode === 2) {
|
||||||
material = new Cesium.CustomColorMaterialSource({
|
material = new Cesium.CustomColorMaterialSource({
|
||||||
color: v
|
color: this.options.color
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.entity.polygon.material = material
|
this.entity.polygon.material = material
|
||||||
@ -244,14 +244,14 @@ class SectorObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.color = c
|
this.color = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.color = 'rgba(255,255,255,1)'
|
this.color = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.color[i] = colorPicker
|
this._elms.color[i] = colorPicker
|
||||||
@ -263,25 +263,25 @@ class SectorObject extends Base {
|
|||||||
return this.options.line.color
|
return this.options.line.color
|
||||||
}
|
}
|
||||||
set lineColor(v) {
|
set lineColor(v) {
|
||||||
this.options.line.color = v
|
this.options.line.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.entity.polyline.material = Cesium.Color.fromCssColorString(v)
|
this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color)
|
||||||
if (this._elms.lineColor) {
|
if (this._elms.lineColor) {
|
||||||
this._elms.lineColor.forEach((item, i) => {
|
this._elms.lineColor.forEach((item, i) => {
|
||||||
let lineColorPicker = new ewPlugins('colorpicker', {
|
let lineColorPicker = new ewPlugins('colorpicker', {
|
||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.line.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
this.lineColor = c
|
this.lineColor = c
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.lineColor = 'rgba(255,255,255,1)'
|
this.lineColor = 'rgba(255,0,0,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.lineColor[i] = lineColorPicker
|
this._elms.lineColor[i] = lineColorPicker
|
||||||
@ -293,10 +293,10 @@ class SectorObject extends Base {
|
|||||||
return this.options.line.width
|
return this.options.line.width
|
||||||
}
|
}
|
||||||
set lineWidth(v) {
|
set lineWidth(v) {
|
||||||
this.options.line.width = v
|
this.options.line.width = ((v || v === 0) ? v : 3)
|
||||||
this.entity.polyline.width = v
|
this.entity.polyline.width = this.options.line.width
|
||||||
this._elms.lineWidth && this._elms.lineWidth.forEach((item) => {
|
this._elms.lineWidth && this._elms.lineWidth.forEach((item) => {
|
||||||
item.value = v
|
item.value = this.options.line.width
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -489,7 +489,7 @@ class SectorObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -24,7 +24,7 @@ class StraightArrowObject extends Base {
|
|||||||
* @param options {object} 属性
|
* @param options {object} 属性
|
||||||
* @param options.show=true {boolean} 显示/隐藏
|
* @param options.show=true {boolean} 显示/隐藏
|
||||||
* @param options.name {string} 名称
|
* @param options.name {string} 名称
|
||||||
* @param options.color="#36c4ff" {string} 颜色
|
* @param options.color="#ff000080" {string} 颜色
|
||||||
* @param options.height {number} 高度
|
* @param options.height {number} 高度
|
||||||
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
* @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式)
|
||||||
* @param {Array.<object>} options.positions 坐标数组 [{lon,lat,alt},...]
|
* @param {Array.<object>} options.positions 坐标数组 [{lon,lat,alt},...]
|
||||||
@ -34,13 +34,13 @@ class StraightArrowObject extends Base {
|
|||||||
constructor(sdk, options = {}, _Dialog = {}) {
|
constructor(sdk, options = {}, _Dialog = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.name = options.name || '未命名对象'
|
this.options.name = options.name || '未命名对象'
|
||||||
this.options.color = options.color || "#36c4ff"
|
this.options.color = options.color || "#ff000080"
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
this.options.positions = options.positions || []
|
this.options.positions = options.positions || []
|
||||||
this.options.line = options.line || {}
|
this.options.line = options.line || {}
|
||||||
this.options.line.width = this.options.line.width || 2
|
this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3)
|
||||||
this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)'
|
this.options.line.color = this.options.line.color || '#ff000080'
|
||||||
this.options['area-unit'] = options['area-unit'] || '平方米'
|
this.options['area-unit'] = options['area-unit'] || '平方米'
|
||||||
this.entity
|
this.entity
|
||||||
this.event = new MouseEvent(this.sdk)
|
this.event = new MouseEvent(this.sdk)
|
||||||
@ -60,8 +60,8 @@ class StraightArrowObject extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -109,14 +109,14 @@ class StraightArrowObject extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff000080'
|
||||||
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let material = Cesium.Color.fromCssColorString(v)
|
let material = Cesium.Color.fromCssColorString(this.options.color)
|
||||||
if (this.sdk.viewer.scene.mode === 2) {
|
if (this.sdk.viewer.scene.mode === 2) {
|
||||||
material = new Cesium.CustomColorMaterialSource({
|
material = new Cesium.CustomColorMaterialSource({
|
||||||
color: v
|
color: this.options.color
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.entity.polygon.material = material
|
this.entity.polygon.material = material
|
||||||
@ -126,7 +126,7 @@ class StraightArrowObject extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
@ -466,7 +466,7 @@ class StraightArrowObject extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -100,7 +100,7 @@ class TrajectoryMotion extends Base {
|
|||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
|
@ -41,7 +41,7 @@ function html(that) {
|
|||||||
<div class="corner-type"></div>
|
<div class="corner-type"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col material-box">
|
<div class="col material-box">
|
||||||
<span class="label">材质样式</span>
|
<span class="label">墙体样式</span>
|
||||||
<div class="material"></div>
|
<div class="material"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,7 +32,7 @@ class WallRealStereoscopic extends Base {
|
|||||||
* @param options['nose-to-tail']=false {boolean} 首尾相连
|
* @param options['nose-to-tail']=false {boolean} 首尾相连
|
||||||
* @param options.extrudedHeight=2.4 {number} 拉伸高度
|
* @param options.extrudedHeight=2.4 {number} 拉伸高度
|
||||||
* @param options.cornerType=0 {string} 拐角类型;0:直角;1:斜角;2:圆角
|
* @param options.cornerType=0 {string} 拐角类型;0:直角;1:斜角;2:圆角
|
||||||
* @param options.material=0 {number} 材质,0:纯色墙;1:砖墙1;2:砖墙2;3:砖墙3
|
* @param options.material=0 {number} 材质,0:纯色墙;1:红砖;2:黄砖;3:灰瓷
|
||||||
* @param {Array.<object>} positions 经纬度和高度的列表,值交替 [{lon,lat,alt},...]
|
* @param {Array.<object>} positions 经纬度和高度的列表,值交替 [{lon,lat,alt},...]
|
||||||
* @param _Dialog {object} 弹框事件
|
* @param _Dialog {object} 弹框事件
|
||||||
* @param _Dialog.confirmCallBack {function} 弹框确认时的回调
|
* @param _Dialog.confirmCallBack {function} 弹框确认时的回调
|
||||||
@ -60,8 +60,8 @@ class WallRealStereoscopic extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -398,7 +398,7 @@ class WallRealStereoscopic extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
@ -1368,20 +1368,20 @@ class WallRealStereoscopic extends Base {
|
|||||||
icon: 'icon-wall'
|
icon: 'icon-wall'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '<i class="icon icon-wall-brick1"></i>砖墙1',
|
name: '<i class="icon icon-wall-brick1"></i>红砖墙',
|
||||||
value: '砖墙1',
|
value: '红砖墙',
|
||||||
key: 1,
|
key: 1,
|
||||||
icon: 'icon-wall-brick1'
|
icon: 'icon-wall-brick1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '<i class="icon icon-wall-brick2"></i>砖墙2',
|
name: '<i class="icon icon-wall-brick2"></i>黄砖墙',
|
||||||
value: '砖墙2',
|
value: '黄砖墙',
|
||||||
key: 2,
|
key: 2,
|
||||||
icon: 'icon-wall-brick2'
|
icon: 'icon-wall-brick2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '<i class="icon icon-wall-brick3"></i>砖墙3',
|
name: '<i class="icon icon-wall-brick3"></i>灰瓷墙',
|
||||||
value: '砖墙3',
|
value: '灰瓷墙',
|
||||||
key: 3,
|
key: 3,
|
||||||
icon: 'icon-wall-brick3'
|
icon: 'icon-wall-brick3'
|
||||||
}
|
}
|
||||||
|
@ -47,8 +47,8 @@ class WallStereoscopic extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -287,7 +287,7 @@ class WallStereoscopic extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -58,8 +58,8 @@ class WallRealStereoscopic extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -373,7 +373,7 @@ class WallRealStereoscopic extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -47,8 +47,8 @@ class WallStereoscopic extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -287,7 +287,7 @@ class WallStereoscopic extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -32,10 +32,10 @@ class WallStereoscopic extends Base {
|
|||||||
* */
|
* */
|
||||||
constructor(sdk, options, _Dialog = {}) {
|
constructor(sdk, options, _Dialog = {}) {
|
||||||
super(sdk, options);
|
super(sdk, options);
|
||||||
this.options.color = options.color || "#00d9ff"
|
this.options.color = options.color || "#ff0000"
|
||||||
this.options.extrudedHeight = options.extrudedHeight || 2.4
|
this.options.extrudedHeight = options.extrudedHeight || 2.4
|
||||||
this.options.positions = options.positions
|
this.options.positions = options.positions
|
||||||
this.options.material = Number(options.material) || 0
|
this.options.material = (Number(options.material) || Number(options.material) === 0) ? Number(options.material) : 3
|
||||||
this.options.duration = (options.duration || options.duration === 0) ? options.duration : 1000
|
this.options.duration = (options.duration || options.duration === 0) ? options.duration : 1000
|
||||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||||
this.options['nose-to-tail'] = options['nose-to-tail'] || false
|
this.options['nose-to-tail'] = options['nose-to-tail'] || false
|
||||||
@ -51,8 +51,8 @@ class WallStereoscopic extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -113,7 +113,7 @@ class WallStereoscopic extends Base {
|
|||||||
return this.options.color
|
return this.options.color
|
||||||
}
|
}
|
||||||
set color(v) {
|
set color(v) {
|
||||||
this.options.color = v
|
this.options.color = v || '#ff0000'
|
||||||
this.entity.polylineVolume.material = this.getMaterial()
|
this.entity.polylineVolume.material = this.getMaterial()
|
||||||
if (this._elms.color) {
|
if (this._elms.color) {
|
||||||
this._elms.color.forEach((item, i) => {
|
this._elms.color.forEach((item, i) => {
|
||||||
@ -121,7 +121,7 @@ class WallStereoscopic extends Base {
|
|||||||
el: item.el,
|
el: item.el,
|
||||||
size: 'mini',//颜色box类型
|
size: 'mini',//颜色box类型
|
||||||
alpha: true,//是否开启透明度
|
alpha: true,//是否开启透明度
|
||||||
defaultColor: v,
|
defaultColor: this.options.color,
|
||||||
disabled: false,//是否禁止打开颜色选择器
|
disabled: false,//是否禁止打开颜色选择器
|
||||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||||
sure: (c) => {
|
sure: (c) => {
|
||||||
@ -140,10 +140,10 @@ class WallStereoscopic extends Base {
|
|||||||
return this.options.material
|
return this.options.material
|
||||||
}
|
}
|
||||||
set material(v) {
|
set material(v) {
|
||||||
this.options.material = Number(v)
|
this.options.material = (Number(v) || Number(v) === 0) ? Number(v) : 3
|
||||||
this.entity.polylineVolume.material = this.getMaterial()
|
this.entity.polylineVolume.material = this.getMaterial()
|
||||||
this._elms.material && this._elms.material.forEach((item) => {
|
this._elms.material && this._elms.material.forEach((item) => {
|
||||||
item.value = v
|
item.value = this.options.material
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,7 +336,7 @@ class WallStereoscopic extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -47,8 +47,8 @@ class WallStereoscopic extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -287,7 +287,7 @@ class WallStereoscopic extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -47,8 +47,8 @@ class WallStereoscopic2 extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -306,7 +306,7 @@ class WallStereoscopic2 extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -47,8 +47,8 @@ class WallStereoscopic extends Base {
|
|||||||
color: options.label.color || '#ffffff',
|
color: options.label.color || '#ffffff',
|
||||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||||
lineColor: options.label.lineColor || '#fff000',
|
lineColor: options.label.lineColor || '#00ffff80',
|
||||||
scaleByDistance: options.label.scaleByDistance || false,
|
scaleByDistance: options.label.scaleByDistance || false,
|
||||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||||
@ -287,7 +287,7 @@ class WallStereoscopic extends Base {
|
|||||||
this.labelLineColor = color
|
this.labelLineColor = color
|
||||||
},//点击确认按钮事件回调
|
},//点击确认按钮事件回调
|
||||||
clear: () => {
|
clear: () => {
|
||||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||||
},//点击清空按钮事件回调
|
},//点击清空按钮事件回调
|
||||||
})
|
})
|
||||||
this._elms.labelLineColor[i] = lineColorPicker
|
this._elms.labelLineColor[i] = lineColorPicker
|
||||||
|
@ -1,21 +1,27 @@
|
|||||||
let fontData = [
|
let fontData = [
|
||||||
|
{
|
||||||
|
name: '黑体',
|
||||||
|
value: '黑体',
|
||||||
|
font: 'SimHei',
|
||||||
|
key: '0'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: '思源黑体',
|
name: '思源黑体',
|
||||||
value: '思源黑体',
|
value: '思源黑体',
|
||||||
font: 'SourceHanSansTi',
|
font: 'SourceHanSansTi',
|
||||||
key: '0'
|
key: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '庞门正道标题体',
|
name: '庞门正道标题体',
|
||||||
value: '庞门正道标题体',
|
value: '庞门正道标题体',
|
||||||
font: 'PMZDBTTi',
|
font: 'PMZDBTTi',
|
||||||
key: '1'
|
key: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '数黑体',
|
name: '数黑体',
|
||||||
value: '数黑体',
|
value: '数黑体',
|
||||||
font: 'AlimamaShuHeiTi',
|
font: 'AlimamaShuHeiTi',
|
||||||
key: '2'
|
key: '3'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user