diff --git a/Apps/Examples/cesium-primitive-customMaterial.html b/Apps/Examples/cesium-primitive-customMaterial.html index e5fe15af..71bfe154 100644 --- a/Apps/Examples/cesium-primitive-customMaterial.html +++ b/Apps/Examples/cesium-primitive-customMaterial.html @@ -42,6 +42,12 @@ .defultbtn:hover { background-color: #b3daf8; } + + .btnon { + background-color: #1E9FFF; + color: #fff; + border: 1px solid #1E9FFF; + } @@ -52,6 +58,7 @@ + + + + +
+
+ + + + \ No newline at end of file diff --git a/Apps/Examples/earth-customPrimitive-character.html b/Apps/Examples/earth-customPrimitive-character.html index ecb0bac0..960e6a24 100644 --- a/Apps/Examples/earth-customPrimitive-character.html +++ b/Apps/Examples/earth-customPrimitive-character.html @@ -60,12 +60,13 @@ }; var p = new XE.Obj.CustomPrimitive(earth) - p.positions = [0,0,0,10,0,0,10,10,0,0,10,0,]; - // p.normals = [0,0,1,0,0,1,0,0,1,0,0,1]; - p.sts = [0,0, 1,0, 1,1, 0,1, ]; - // p.colors = [1,1,0,1, 1,1,1,1, 1,1,1,1, 1,1,1,1]; - p.indices = [0, 1, 2, 0, 2, 3]; - // p.rotation = [0, 1.57, 0]; + + p.position = [116.39, 39.9, 10.0].xeptr; + p.positions = XE.Obj.CustomPrimitive.Geometry.unitSquare.positions; + p.sts = XE.Obj.CustomPrimitive.Geometry.unitSquare.sts; + p.indices = XE.Obj.CustomPrimitive.Geometry.unitSquare.indices; + p.scale = [100, 100, 1]; + p.renderState = XE.Obj.CustomPrimitive.getRenderState(true, true); p.vertexShaderSource = '#define FLAT\n' + p.vertexShaderSource; diff --git a/Apps/Examples/earth-customPrimitive-circle.html b/Apps/Examples/earth-customPrimitive-circle.html index 4a26b29e..bd14f773 100644 --- a/Apps/Examples/earth-customPrimitive-circle.html +++ b/Apps/Examples/earth-customPrimitive-circle.html @@ -57,13 +57,13 @@ }; var p = new XE.Obj.CustomPrimitive(earth) - window.p = p; // 方便调试 - p.positions = [0,0,0,10,0,0,10,10,0,0,10,0,]; - // p.normals = [0,0,1,0,0,1,0,0,1,0,0,1]; - p.sts = [0,0, 1,0, 1,1, 0,1, ]; - // p.colors = [1,1,0,1, 1,1,1,1, 1,1,1,1, 1,1,1,1]; - p.indices = [0, 1, 2, 0, 2, 3]; - // p.rotation = [0, 1.57, 0]; + + p.position = [116.39, 39.9, 10.0].xeptr; + p.positions = XE.Obj.CustomPrimitive.Geometry.unitSquare.positions; + p.sts = XE.Obj.CustomPrimitive.Geometry.unitSquare.sts; + p.indices = XE.Obj.CustomPrimitive.Geometry.unitSquare.indices; + p.scale = [100, 100, 1]; + p.renderState = XE.Obj.CustomPrimitive.getRenderState(true, true); // var imageUri = './images/earth.png'; @@ -145,6 +145,8 @@ }); p.flyTo(); + + window.p = p; // 方便调试 } // 1 XE.ready()会加载Cesium.js等其他资源,注意ready()返回一个Promise对象。 diff --git a/Apps/Examples/earth-customPrimitive-image.html b/Apps/Examples/earth-customPrimitive-image.html new file mode 100644 index 00000000..7ed7f510 --- /dev/null +++ b/Apps/Examples/earth-customPrimitive-image.html @@ -0,0 +1,125 @@ + + + + + + + + + 自定义图元-image + + + + + + +
+
+ + + + \ No newline at end of file diff --git a/Apps/Examples/earth-customPrimitive-svg.html b/Apps/Examples/earth-customPrimitive-svg.html index f8502daa..9108928c 100644 --- a/Apps/Examples/earth-customPrimitive-svg.html +++ b/Apps/Examples/earth-customPrimitive-svg.html @@ -57,13 +57,13 @@ }; var p = new XE.Obj.CustomPrimitive(earth) - window.p = p; // 方便调试 p.positions = [0,0,0,10,0,0,10,10,0,0,10,0,]; // p.normals = [0,0,1,0,0,1,0,0,1,0,0,1]; p.sts = [0,0, 1,0, 1,1, 0,1, ]; // p.colors = [1,1,0,1, 1,1,1,1, 1,1,1,1, 1,1,1,1]; p.indices = [0, 1, 2, 0, 2, 3]; // p.rotation = [0, 1.57, 0]; + p.renderState = XE.Obj.CustomPrimitive.getRenderState(true, true); p.canvasWidth = 256; @@ -86,6 +86,8 @@ }); p.flyTo(); + + window.p = p; // 方便调试 } // 1 XE.ready()会加载Cesium.js等其他资源,注意ready()返回一个Promise对象。 diff --git a/Apps/Examples/earth-digitalCity.html b/Apps/Examples/earth-digitalCity.html index 447a8697..d8670986 100644 --- a/Apps/Examples/earth-digitalCity.html +++ b/Apps/Examples/earth-digitalCity.html @@ -21,12 +21,24 @@ -
+
diff --git a/Apps/Examples/earth-forceSunPos.html b/Apps/Examples/earth-forceSunPos.html index 33fc4d57..e6c914d2 100644 --- a/Apps/Examples/earth-forceSunPos.html +++ b/Apps/Examples/earth-forceSunPos.html @@ -64,7 +64,6 @@ .divnotClick input { background: gray; border: none; - padding: 3px 2px; } @@ -86,9 +85,10 @@ 相机方向
强制光照位置
- 经度:
- 纬度:
- 高度:m
+ 经度: {{ position[0] | numFilter }}°
+
+ 纬度: {{ position[1] | numFilter }}°
+
@@ -166,6 +166,13 @@ window.feiji = feiji; window.earth = earth; }, + filters: { + numFilter(value) { + // 截取当前数据到小数点后两位 + let realVal = value.toFixed(5) + return realVal + } + }, // 1.2 资源销毁 beforeDestroy() { // vue程序销毁时,需要清理相关资源 diff --git a/Apps/Examples/earth-model-editing.html b/Apps/Examples/earth-model-editing.html index bdfa0de7..5cca3be5 100644 --- a/Apps/Examples/earth-model-editing.html +++ b/Apps/Examples/earth-model-editing.html @@ -142,7 +142,7 @@ this._rotationEditingUnbind = XE.MVVM.bind(this, 'rotationEditing', model1, 'rotationEditing'); this._positionEditingUnbind = XE.MVVM.bind(this, 'positionEditing', model1, 'positionEditing'); this._xbsjPositionUnbind = XE.MVVM.bindPosition(this, 'xbsjPosition', model1, 'xbsjPosition'); - this._xbsjRotationUnbind = XE.MVVM.bindPosition(this, 'xbsjRotation', model1, 'xbsjRotation'); + this._xbsjRotationUnbind = XE.MVVM.bindRotation(this, 'xbsjRotation', model1, 'xbsjRotation'); // 设置初始值 earth.terrainEffect.subSurfaceEnabled = false; diff --git a/Apps/Examples/earth-path-doubleView.html b/Apps/Examples/earth-path-doubleView.html index 192954dc..918732f5 100644 --- a/Apps/Examples/earth-path-doubleView.html +++ b/Apps/Examples/earth-path-doubleView.html @@ -98,7 +98,6 @@ mounted() { // 1.1.1 创建地球 var earth = new XE.Earth(this.$refs.earthContainer); - var earth2 = new XE.Earth(this.$refs.earthContainer2); // 1.1.2 场景配置 earth.sceneTree.root = { @@ -180,6 +179,32 @@ }] }; + var tileset = earth.sceneTree.$refs.tileset.czmObject; + var path1 = earth.sceneTree.$refs.path1.czmObject; + + // 1.1.3 设置相机位置 + earth.camera.position = [1.9017007350831856, 0.5971509194979703, 1114.6983194890267]; + earth.camera.rotation = [6.283185307179421, -0.7855578455379368, 6.283185307179586]; + + // 定义一个pin用来跟踪路径 + const pin1 = new XE.Obj.Pin(earth); + + // 1.1.4 跟踪 + // 单向绑定的属性,pin将跟踪path1,但pin发生变化path1并不会跟踪! + // currentPosition 当前相机位置,形式如:[0, 0, 0] 该数组中的元素分别表示经度(单位弧度)、纬度(单位弧度)、高度(单位米)。 注意该属性,为只读属性! + this._pin1Unbind = XE.MVVM.track(pin1, 'position', path1, 'currentPosition'); + + this._earth = earth; + + // only for Debug + window.tileset = tileset; + window.path1 = path1; + window.earth = earth; + + // 2.1.1 创建地球 + var earth2 = new XE.Earth(this.$refs.earthContainer2); + + // 2.1.2 场景配置 earth2.sceneTree.root = { "expand": true, "title": "预览场景", @@ -259,49 +284,32 @@ }] }; - var tileset = earth.sceneTree.$refs.tileset.czmObject; - var path1 = earth.sceneTree.$refs.path1.czmObject; var tileset2 = earth2.sceneTree.$refs.tileset2.czmObject; var path2 = earth2.sceneTree.$refs.path2.czmObject; - // 1.1.3 设置相机位置 + // 2.1.3 设置相机位置 // earth.camera.position.toString()和earth.camera.toAllJSONStr()这两个方法可获取相机位置 - earth.camera.position = [1.9017007350831856, 0.5971509194979703, 1114.6983194890267]; - earth.camera.rotation = [6.283185307179421, -0.7855578455379368, 6.283185307179586]; earth2.camera.position = [1.9017007350831856, 0.5971509194979703, 1114.6983194890267]; earth2.camera.rotation = [6.283185307179421, -0.7855578455379368, 6.283185307179586]; // 定义一个pin用来跟踪路径 - const pin1 = new XE.Obj.Pin(earth); const pin2 = new XE.Obj.Pin(earth2); - // 1.1.4 跟踪 + // 2.1.4 跟踪 // 单向绑定的属性,pin将跟踪path1,但pin发生变化path1并不会跟踪! // currentPosition 当前相机位置,形式如:[0, 0, 0] 该数组中的元素分别表示经度(单位弧度)、纬度(单位弧度)、高度(单位米)。 注意该属性,为只读属性! - this._pin1Unbind = XE.MVVM.track(pin1, 'position', path1, 'currentPosition'); this._pin2Unbind = XE.MVVM.track(pin2, 'position', path2, 'currentPosition'); // 绑定相机 path2.cameraAttached = true; - this._earth = earth; this._earth2 = earth2; // only for Debug - window.tileset = tileset; - window.path1 = path1; - window.earth = earth; window.tileset2 = tileset2; window.path2 = path2; window.earth2 = earth2; }, - filters: { - numFilter(value) { - // 截取当前数据到小数点后两位 - let realVal = parseFloat(value).toFixed(2) - return realVal - } - }, // 1.2 资源销毁 beforeDestroy() { // vue程序销毁时,需要清理相关资源 diff --git a/Apps/Examples/earth-pin-div.html b/Apps/Examples/earth-pin-div.html index b65ce659..43ec8cf7 100644 --- a/Apps/Examples/earth-pin-div.html +++ b/Apps/Examples/earth-pin-div.html @@ -39,7 +39,7 @@ -
+
@@ -47,7 +47,7 @@ // 1 创建Earth的vue组件 var EarthComp = { template: ` -
+
diff --git a/Apps/Examples/earth-pin-gif.html b/Apps/Examples/earth-pin-gif.html index 12cab9ed..6a65be5a 100644 --- a/Apps/Examples/earth-pin-gif.html +++ b/Apps/Examples/earth-pin-gif.html @@ -39,7 +39,7 @@ -
+
diff --git a/Apps/Examples/earth-scaneline-show.html b/Apps/Examples/earth-scaneline-show.html index 9aa76693..a5d62148 100644 --- a/Apps/Examples/earth-scaneline-show.html +++ b/Apps/Examples/earth-scaneline-show.html @@ -19,49 +19,6 @@ margin: 0px; padding: 0px; } - - input { - width: 350px; - } - - .checkbox { - display: inline-block; - cursor: pointer; - } - - .play { - width: 20px; - height: 16px; - } - - .defultbtn { - display: inline-block; - text-align: center; - min-width: 60px; - height: 38px; - padding: 0 10px; - line-height: 38px; - border-radius: 100px; - border: 1px solid #C9C9C9; - background-color: #FFF; - color: #555; - cursor: pointer; - margin-bottom: 4px; - } - - .defultbtn:hover { - background-color: #b3daf8; - } - - .btnon { - background-color: #1E9FFF; - color: #fff; - border: 1px solid #1E9FFF; - } - - .colorbox { - width: 50px; - } @@ -75,7 +32,7 @@ var EarthComp = { template: `
-
+
@@ -83,12 +40,7 @@ data() { return { _earth: undefined, // 注意:Earth和Cesium的相关变量放在vue中,必须使用下划线作为前缀! - playing: false, - show: false, - loopPlay: false, - timeDuration: 0, - radius: 0, - currentTime: 0 + isClick: true }; }, // 1.1 资源创建 @@ -148,14 +100,6 @@ earth.camera.position = [2.120534085472877, 0.5445599473813671, 3486.259508603404]; earth.camera.rotation = [6.283185307179578, -0.7863374047795091, 1.0658141036401503e-14]; - // 1.1.5 数据绑定 - this._playingUnbind = XE.MVVM.bind(this, 'playing', scanline1, 'playing'); - this._showUnbind = XE.MVVM.bind(this, 'show', scanline1, 'show'); - this._loopPlayUnbind = XE.MVVM.bind(this, 'loopPlay', scanline1, 'loopPlay'); - this._timeDurationUnbind = XE.MVVM.bind(this, 'timeDuration', scanline1, 'timeDuration'); - this._radiusUnbind = XE.MVVM.bind(this, 'radius', scanline1, 'radius'); - this._currentTimeUnbind = XE.MVVM.bind(this, 'currentTime', scanline1, 'currentTime'); - this._earth = earth; // only for Debug @@ -167,33 +111,36 @@ }, methods: { createdscanline() { - let earthapp = this.$refs.earthContainer; - console.log(scanline1.timeDuration) - - earthapp.addEventListener('click', function (e) { - console.log(e); - scanline1.position = earth.pickPosition({ x: e.offsetX, y: e.offsetY }); - scanline1.show = true; - scanline1.loopPlay = false; - scanline1.playing = true; - }); - - - // scanline1.show = false; + let viewer = earth._viewer; + let firstTime = '', endTime = ''; + + this.handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas); + this.handler.setInputAction(event => { + firstTime = new Date().getTime(); + }, Cesium.ScreenSpaceEventType.LEFT_DOWN); + this.handler.setInputAction(event => { + endTime = new Date().getTime(); + var disTime = endTime - firstTime; + if (disTime < 200) { + this.isClick = true; + } else { + this.isClick = false; + } + }, Cesium.ScreenSpaceEventType.LEFT_UP); }, - colorchange(event) { - var color = event.target.value; - scanline1.color = color.xeColor; + scanelineClick(e) { + if (!this.isClick) { + return false; + } + scanline1.position = earth.pickPosition({ x: e.offsetX, y: e.offsetY }); + scanline1.show = true; + scanline1.loopPlay = false; + scanline1.playing = true; } }, // 1.2 资源销毁 beforeDestroy() { // vue程序销毁时,需要清理相关资源 - this._playingUnbind = this._playingUnbind && this._playingUnbind(); - this._showUnbind = this._showUnbind && this._showUnbind(); - this._timeDurationUnbind = this._timeDurationUnbind && this._timeDurationUnbind(); - this._radiusUnbind = this._radiusUnbind && this._radiusUnbind(); - this._currentTimeUnbind = this._currentTimeUnbind && this._currentTimeUnbind(); this._earth = this._earth && this._earth.destroy(); }, } diff --git a/Apps/Examples/images/circle.png b/Apps/Examples/images/circle.png new file mode 100644 index 00000000..f4be91b2 Binary files /dev/null and b/Apps/Examples/images/circle.png differ diff --git a/Apps/Examples/images/city/billboard.png b/Apps/Examples/images/city/billboard.png new file mode 100644 index 00000000..ae874c1f Binary files /dev/null and b/Apps/Examples/images/city/billboard.png differ diff --git a/Apps/Examples/images/city/billboard2.png b/Apps/Examples/images/city/billboard2.png new file mode 100644 index 00000000..9dc7aa53 Binary files /dev/null and b/Apps/Examples/images/city/billboard2.png differ diff --git a/Apps/Examples/images/city/circular2.png b/Apps/Examples/images/city/circular2.png new file mode 100644 index 00000000..df15ab87 Binary files /dev/null and b/Apps/Examples/images/city/circular2.png differ diff --git a/Apps/Examples/images/city/particles.png b/Apps/Examples/images/city/particles.png new file mode 100644 index 00000000..2fd7e574 Binary files /dev/null and b/Apps/Examples/images/city/particles.png differ diff --git a/Apps/Examples/images/ht/circular_03.png b/Apps/Examples/images/ht/circular_03.png new file mode 100644 index 00000000..2d896f1e Binary files /dev/null and b/Apps/Examples/images/ht/circular_03.png differ diff --git a/Apps/Examples/images/ht/gradual_change_red_02.png b/Apps/Examples/images/ht/gradual_change_red_02.png new file mode 100644 index 00000000..2265449c Binary files /dev/null and b/Apps/Examples/images/ht/gradual_change_red_02.png differ diff --git a/Apps/Examples/images/ht/meteor_01.png b/Apps/Examples/images/ht/meteor_01.png new file mode 100644 index 00000000..b8d0ffdc Binary files /dev/null and b/Apps/Examples/images/ht/meteor_01.png differ diff --git a/Apps/Examples/images/ht/meteor_02.png b/Apps/Examples/images/ht/meteor_02.png new file mode 100644 index 00000000..e7226392 Binary files /dev/null and b/Apps/Examples/images/ht/meteor_02.png differ diff --git a/Apps/Examples/mrq/slation.html b/Apps/Examples/mrq/slation.html index 9e1ae83f..7d4ed571 100644 --- a/Apps/Examples/mrq/slation.html +++ b/Apps/Examples/mrq/slation.html @@ -123,7 +123,7 @@ this._rotationEditingUnbind = XE.MVVM.bind(this, 'rotationEditing', tileset, 'rotationEditing'); this._positionEditingUnbind = XE.MVVM.bind(this, 'positionEditing', tileset, 'positionEditing'); this._xbsjPositionUnbind = XE.MVVM.bindPosition(this, 'xbsjPosition', tileset, 'xbsjPosition'); - this._xbsjRotationUnbind = XE.MVVM.bindPosition(this, 'xbsjRotation', tileset, 'xbsjRotation'); + this._xbsjRotationUnbind = XE.MVVM.bindRotation(this, 'xbsjRotation', tileset, 'xbsjRotation'); this._earth = earth; diff --git a/Apps/Examples/scripts/list.js b/Apps/Examples/scripts/list.js index 4bd4ed10..71c7c0c2 100644 --- a/Apps/Examples/scripts/list.js +++ b/Apps/Examples/scripts/list.js @@ -67,6 +67,10 @@ vueApp.examples = [ "title": "漫游-第一人称", "url": "./earth-camera-firstpersion.html" }, + { + "title": "自定义贴地矩形-image", + "url": "./earth-customGroundRectangle-image.html" + }, { "title": "自定义图元-毛笔字", "url": "./earth-customPrimitive-character.html" @@ -75,6 +79,10 @@ vueApp.examples = [ "title": "自定义图元-圆", "url": "./earth-customPrimitive-circle.html" }, + { + "title": "自定义图元-image", + "url": "./earth-customPrimitive-image.html" + }, { "title": "自定义图元-SVG", "url": "./earth-customPrimitive-svg.html" diff --git a/CHANGLES.md b/CHANGLES.md index 6f13e4e2..53d74de0 100644 --- a/CHANGLES.md +++ b/CHANGLES.md @@ -1,6 +1,24 @@ Change Log ========== +### 1.2.7 - 2019-11-9 + +##### Fixes :wrench: +* 修复旋转角度不对的问题 + +### 1.2.6 - 2019-11-9 + +##### Additions :tada: +* EarthUI标绘新增了贝塞尔2次曲线和贝塞尔3次曲线功能 + +##### Fixes :wrench: +* 完善数字城市的示例,通过自定义图元类增加多种可视化效果 +* 修复视域分析等的旋转角度不对的问题 +* 修复视域分析等示例中旋转角度表示错误 +* 修复pin-div示例中出现了滚动条问题 +* 修复扫描线点击示例中点击和拖动起冲突问题 +* 把示例和视景器中的强制光照中的经度、纬度修改为滑动条,并把高度去掉 + ### 1.2.5 - 2019-11-6 ##### Fixes :wrench: diff --git a/Source/components/MainUIComp.vue b/Source/components/MainUIComp.vue index 1dc26377..f8a571ce 100644 --- a/Source/components/MainUIComp.vue +++ b/Source/components/MainUIComp.vue @@ -80,6 +80,8 @@ import GeoSectorSearch from "./viztools/GeoSectorSearch"; import GeoPolylineArrow from "./viztools/GeoPolylineArrow"; import GeoPolyline from "./viztools/GeoPolyline"; import GeoArc from "./viztools/GeoArc"; +import GeoBezier2 from "./viztools/GeoBezier2"; +import GeoBezier3 from "./viztools/GeoBezier3"; import GeoTriFlag from "./viztools/GeoTriFlag"; import ScanlineTool from "./viztools/ScanlineTool"; @@ -128,6 +130,8 @@ export default { GeoPolylineArrow, GeoPolyline, GeoArc, + GeoBezier2, + GeoBezier3, GeoTriFlag, ScanlineTool, @@ -172,6 +176,8 @@ export default { GeoPolylineArrow: "GeoPolylineArrow", GeoPolyline: "GeoPolyline", GeoArc: "GeoArc", + GeoBezier2: "GeoBezier2", + GeoBezier3: "GeoBezier3", GeoTriFlag: "GeoTriFlag", GeoDoubleArrow: "GeoDoubleArrow", GeoCircle: "GeoCircle", diff --git a/Source/components/controls/MainBarControl/Effect/ForceSunPos.vue b/Source/components/controls/MainBarControl/Effect/ForceSunPos.vue index 6c863fbe..24dc7d08 100644 --- a/Source/components/controls/MainBarControl/Effect/ForceSunPos.vue +++ b/Source/components/controls/MainBarControl/Effect/ForceSunPos.vue @@ -9,9 +9,22 @@
- +
- + + +
+
+
+ +
+
@@ -25,11 +38,15 @@ export default { langs: { zh: { usecamerapos: "相机方向", - position: "位置" + position: "位置", + jingdu: "经度", + weidu: "纬度" }, en: { usecamerapos: "cameraposition", - position: "position" + position: "position", + jingdu: "jingdu", + weidu: "weidu" } }, lang: undefined, @@ -41,6 +58,8 @@ export default { mounted() { this.bind("useCameraPos"); this.bind("position"); + this.position[0] = (this.position[0] * 180) / Math.PI; + this.position[1] = (this.position[1] * 180) / Math.PI; }, methods: { bind(prp) { diff --git a/Source/components/tools/EntityMoreTool/index.vue b/Source/components/tools/EntityMoreTool/index.vue index 60453e18..aaa0849e 100644 --- a/Source/components/tools/EntityMoreTool/index.vue +++ b/Source/components/tools/EntityMoreTool/index.vue @@ -18,20 +18,32 @@
    -
  • {{lang.dot}}
  • +
  • {{lang.pin}}
  • +
  • {{lang.pinpicturebtn}}
  • +
  • {{lang.pindivbtn}}
    +
  • {{lang.path}}
  • +
  • {{lang.polyline}}
  • +
  • {{lang.curvearrow}}
  • +
  • {{lang.polylinearrow}}
  • +
  • {{lang.sectorsearch}}
  • {{lang.arc}}
  • +
  • {{lang.bezier2}}
  • +
  • {{lang.bezier3}}
  • {{lang.circle}}
  • {{lang.rectangle}}
  • +
  • {{lang.triflag}}
  • {{lang.curveflag}}
  • {{lang.rightangleflag}}
  • +
  • {{lang.doublearrow}}
  • +
  • {{lang.polygon}}
@@ -53,11 +65,24 @@ export default { dot: "点", line: "线", surface: "面", + pin: "内置图标", + pinpicturebtn: "外置图标", + pindivbtn: "div图标", + path: "路径", + polyline: "折线", + curvearrow: "曲线箭头", + polylinearrow: "折线箭头", + sectorsearch: "扇形搜索", arc: "圆弧", + bezier2: "贝塞尔2次曲线", + bezier3: "贝塞尔3次曲线", circle: "圆", + triflag: "三角旗标", curveflag: "曲面旗标", rectangle: "矩形", rightangleflag: "直角旗标", + doublearrow: "双箭头", + polygon: "多边形", title: "标绘", entityclassic: "标绘类型" }, @@ -65,11 +90,24 @@ export default { dot: "dot", line: "line", surface: "surface", + pin: "Built icon", + pinpicturebtn: "External Icon", + pindivbtn: "div icon", + path: "path", + polyline: "polyline", + curvearrow: "curvearrow", + polylinearrow: "polylinearrow", + sectorsearch: "sectorsearch", arc: "arc", + bezier2: "bezier2", + bezier3: "bezier3", circle: "circle", + triflag: "triflag", curveflag: "curveflag", rectangle: "rectangle", rightangleflag: "rightangleflag", + doublearrow: "doublearrow", + polygon: "polygon", title: "Entity", entityclassic: "EntityClassic" } @@ -129,6 +167,77 @@ export default { this.surfaceShow = true; } }, + // 内置图标 + Pinbtn() { + var Pin = new XE.Obj.Pin(this.$root.$earth); + Pin.ctrtype = "PinTool"; + Pin.name = "内置图标"; + Pin.positionPicking = true; + Pin.isCreating = true; + Pin.creating = true; + this.$root.$earthUI.showPropertyWindow(Pin); + }, + // 外置图标 + Pinpicturebtn() { + var PinPictureTool = new XE.Obj.Pin(this.$root.$earth); + PinPictureTool.ctrtype = "PinPictureTool"; + PinPictureTool.name = "外置图标"; + PinPictureTool.positionPicking = true; + PinPictureTool.isCreating = true; + PinPictureTool.creating = true; + this.$root.$earthUI.showPropertyWindow(PinPictureTool); + }, + // div图标 + Pindivbtn() { + var PinDivTool = new XE.Obj.Plots.GeoPin(this.$root.$earth); + PinDivTool.ctrtype = "PinDivTool"; + PinDivTool.name = "div图标"; + PinDivTool.isCreating = true; + PinDivTool.creating = true; + PinDivTool._pin.show = false; + this.$root.$earthUI.showPropertyWindow(PinDivTool); + }, + // 路径 + Path() { + var Path = new XE.Obj.Path(this.$root.$earth); + Path.name = "路径"; + Path.positionPicking = true; + Path.isCreating = true; + Path.creating = true; + this.$root.$earthUI.showPropertyWindow(Path); + }, + // 折线 + Polyline() { + var Polyline = new XE.Obj.Plots.GeoPolyline(this.$root.$earth); + Polyline.creating = true; + Polyline.isCreating = true; + Polyline.name = "折线"; + this.$root.$earthUI.showPropertyWindow(Polyline); + }, + // 曲线箭头 + CurveArrow() { + var GeoCurveArrow = new XE.Obj.Plots.GeoCurveArrow(this.$root.$earth); + GeoCurveArrow.creating = true; + GeoCurveArrow.isCreating = true; + GeoCurveArrow.name = "曲线箭头"; + this.$root.$earthUI.showPropertyWindow(GeoCurveArrow); + }, + // 折线箭头 + PolylineArrow() { + var PolylineArrow = new XE.Obj.Plots.GeoPolylineArrow(this.$root.$earth); + PolylineArrow.creating = true; + PolylineArrow.isCreating = true; + PolylineArrow.name = "折线箭头"; + this.$root.$earthUI.showPropertyWindow(PolylineArrow); + }, + // 扇形搜索 + SectorSearch() { + var SectorSearch = new XE.Obj.Plots.GeoSectorSearch(this.$root.$earth); + SectorSearch.creating = true; + SectorSearch.isCreating = true; + SectorSearch.name = "扇形搜索"; + this.$root.$earthUI.showPropertyWindow(SectorSearch); + }, // 圆弧 Arc() { var Arc = new XE.Obj.Plots.GeoArc(this.$root.$earth); @@ -137,6 +246,22 @@ export default { Arc.name = "圆弧"; this.$root.$earthUI.showPropertyWindow(Arc); }, + // 贝塞尔2次曲线 + Bezier2() { + var Bezier2 = new XE.Obj.Plots.GeoBezier2(this.$root.$earth); + Bezier2.creating = true; + Bezier2.isCreating = true; + Bezier2.name = "贝塞尔2次曲线"; + this.$root.$earthUI.showPropertyWindow(Bezier2); + }, + // 贝塞尔3次曲线 + Bezier3() { + var Bezier3 = new XE.Obj.Plots.GeoBezier3(this.$root.$earth); + Bezier3.creating = true; + Bezier3.isCreating = true; + Bezier3.name = "贝塞尔3次曲线"; + this.$root.$earthUI.showPropertyWindow(Bezier3); + }, // 圆 Circle() { var Circle = new XE.Obj.Plots.GeoCircle(this.$root.$earth); @@ -153,6 +278,14 @@ export default { Rectangle.name = "矩形"; this.$root.$earthUI.showPropertyWindow(Rectangle); }, + // 三角旗标 + TriFlag() { + var TriFlag = new XE.Obj.Plots.GeoTriFlag(this.$root.$earth); + TriFlag.creating = true; + TriFlag.isCreating = true; + TriFlag.name = "三角旗标"; + this.$root.$earthUI.showPropertyWindow(TriFlag); + }, // 曲面旗标 CurveFlag() { var CurveFlag = new XE.Obj.Plots.GeoCurveFlag(this.$root.$earth); @@ -170,6 +303,22 @@ export default { RightAngleFlag.isCreating = true; RightAngleFlag.name = "直角旗标"; this.$root.$earthUI.showPropertyWindow(RightAngleFlag); + }, + // 双箭头 + DoubleArrow() { + var DoubleArrow = new XE.Obj.Plots.GeoDoubleArrow(this.$root.$earth); + DoubleArrow.creating = true; + DoubleArrow.isCreating = true; + DoubleArrow.name = "双箭头"; + this.$root.$earthUI.showPropertyWindow(DoubleArrow); + }, + // 多边形 + Polygon() { + var Polygon = new XE.Obj.Plots.GeoPolygon(this.$root.$earth); + Polygon.creating = true; + Polygon.isCreating = true; + Polygon.name = "多边形"; + this.$root.$earthUI.showPropertyWindow(Polygon); } } }; @@ -184,7 +333,7 @@ export default { li { list-style: none; float: left; - width: 70px; + width: 82px; height: 30px; line-height: 30px; text-align: center; diff --git a/Source/components/viztools/GeoBezier2/index.vue b/Source/components/viztools/GeoBezier2/index.vue new file mode 100644 index 00000000..871200ac --- /dev/null +++ b/Source/components/viztools/GeoBezier2/index.vue @@ -0,0 +1,497 @@ + + + + + \ No newline at end of file diff --git a/Source/components/viztools/GeoBezier2/index_locale.js b/Source/components/viztools/GeoBezier2/index_locale.js new file mode 100644 index 00000000..47adecc7 --- /dev/null +++ b/Source/components/viztools/GeoBezier2/index_locale.js @@ -0,0 +1,26 @@ +const zh = { + title: '折线', + name: '名称', + show: '显示', + creating: '创建', + editing: '编辑', + ground: '贴地', + width: '宽度', + color: '颜色' +}; + +const en = { + title: 'GeoPolyline', + name: 'name', + show: 'show', + creating: 'creating', + editing: 'editing', + ground: 'ground', + width: 'width', + color: 'color' +}; + +export default { + zh, + en +}; \ No newline at end of file diff --git a/Source/components/viztools/GeoBezier3/index.vue b/Source/components/viztools/GeoBezier3/index.vue new file mode 100644 index 00000000..871200ac --- /dev/null +++ b/Source/components/viztools/GeoBezier3/index.vue @@ -0,0 +1,497 @@ + + + + + \ No newline at end of file diff --git a/Source/components/viztools/GeoBezier3/index_locale.js b/Source/components/viztools/GeoBezier3/index_locale.js new file mode 100644 index 00000000..47adecc7 --- /dev/null +++ b/Source/components/viztools/GeoBezier3/index_locale.js @@ -0,0 +1,26 @@ +const zh = { + title: '折线', + name: '名称', + show: '显示', + creating: '创建', + editing: '编辑', + ground: '贴地', + width: '宽度', + color: '颜色' +}; + +const en = { + title: 'GeoPolyline', + name: 'name', + show: 'show', + creating: 'creating', + editing: 'editing', + ground: 'ground', + width: 'width', + color: 'color' +}; + +export default { + zh, + en +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e79385f2..a4f53e6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "xbsj-earthui", - "version": "1.2.5", + "version": "1.2.7", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2728,15 +2728,15 @@ } }, "earthsdk": { - "version": "1.2.5", - "resolved": "https://registry.npm.taobao.org/earthsdk/download/earthsdk-1.2.5.tgz", - "integrity": "sha1-EcqChrikrl5kQjYEf4Xru7Yi9yY=", + "version": "1.2.7", + "resolved": "https://registry.npm.taobao.org/earthsdk/download/earthsdk-1.2.7.tgz?cache=0&sync_timestamp=1573292757808&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fearthsdk%2Fdownload%2Fearthsdk-1.2.7.tgz", + "integrity": "sha1-3o9BD+ksl1fa+U/l1HAz/u7GXqQ=", "dev": true }, "earthsdk-plotting-symbol": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/earthsdk-plotting-symbol/-/earthsdk-plotting-symbol-1.0.10.tgz", - "integrity": "sha512-/DwWAdcIqLJaV9z9VCbILLZPhSZepwAUFStcAZGhWloo0CkGuHoyAgT9W8b169HaKcew8qbD//lcrwtsCQlK9w==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/earthsdk-plotting-symbol/-/earthsdk-plotting-symbol-1.0.11.tgz", + "integrity": "sha512-TXbVCkEIdHgbIa2mBTeyAOQ3NSaUMbYG6EsCPBEze4oz/99rbCqw982CQoGagknNo8bsfhQgZ0gH7aoVou53Mw==", "dev": true }, "ecc-jsbn": { diff --git a/package.json b/package.json index b274f5fb..9926d3d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xbsj-earthui", - "version": "1.2.5", + "version": "1.2.7", "description": "xbsj-earthui", "main": "index.js", "keywords": [ @@ -45,8 +45,8 @@ "copy-webpack-plugin": "^4.5.2", "cross-env": "^5.1.3", "css-loader": "^0.28.11", - "earthsdk": "1.2.5", - "earthsdk-plotting-symbol": "1.0.10", + "earthsdk": "1.2.7", + "earthsdk-plotting-symbol": "1.0.11", "file-loader": "^1.1.6", "globby": "^10.0.1", "history": "^4.7.2",