Merge branch 'master' of http://192.168.0.105:10010/r/pyhmap
17 files modified
15 files added
| | |
| | | { |
| | | "name": "方量分析", |
| | | "uri": "widgets/volumeAnalysis/Widget" |
| | | }, |
| | | { |
| | | "name": "空间查询", |
| | | "uri": "widgets/spatialQuery/Widget" |
| | | } |
| | | ], |
| | | "groups": [], |
| New file |
| | |
| | | { |
| | | "asset": { |
| | | "generator": "COLLADA2GLTF", |
| | | "version": "2.0" |
| | | }, |
| | | "scene": 0, |
| | | "scenes": [ |
| | | { |
| | | "nodes": [ |
| | | 0 |
| | | ] |
| | | } |
| | | ], |
| | | "nodes": [ |
| | | { |
| | | "mesh": 0, |
| | | "children": [ |
| | | 3, |
| | | 1 |
| | | ], |
| | | "matrix": [ |
| | | 0, |
| | | 0, |
| | | 1, |
| | | 0, |
| | | 0, |
| | | 1, |
| | | 0, |
| | | 0, |
| | | -1, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 1 |
| | | ] |
| | | }, |
| | | { |
| | | "children": [ |
| | | 2 |
| | | ], |
| | | "matrix": [ |
| | | 1, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 1, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 1, |
| | | 0, |
| | | -1.352329969406128, |
| | | 0.4277220070362091, |
| | | -2.98022992950564e-8, |
| | | 1 |
| | | ] |
| | | }, |
| | | { |
| | | "mesh": 1, |
| | | "rotation": [ |
| | | 0, |
| | | 0, |
| | | 0.08848590403795242, |
| | | -0.9960774183273317 |
| | | ] |
| | | }, |
| | | { |
| | | "children": [ |
| | | 4 |
| | | ], |
| | | "matrix": [ |
| | | 1, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 1, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 0, |
| | | 1, |
| | | 0, |
| | | 1.432669997215271, |
| | | 0.4277220070362091, |
| | | -2.98022992950564e-8, |
| | | 1 |
| | | ] |
| | | }, |
| | | { |
| | | "mesh": 1, |
| | | "rotation": [ |
| | | 0, |
| | | 0, |
| | | 0.08848590403795242, |
| | | -0.9960774183273317 |
| | | ] |
| | | } |
| | | ], |
| | | "meshes": [ |
| | | { |
| | | "primitives": [ |
| | | { |
| | | "attributes": { |
| | | "NORMAL": 5, |
| | | "POSITION": 6, |
| | | "TEXCOORD_0": 7 |
| | | }, |
| | | "indices": 4, |
| | | "mode": 4, |
| | | "material": 0, |
| | | "extensions": { |
| | | "KHR_draco_mesh_compression": { |
| | | "bufferView": 2, |
| | | "attributes": { |
| | | "NORMAL": 0, |
| | | "POSITION": 1, |
| | | "TEXCOORD_0": 2 |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "NORMAL": 9, |
| | | "POSITION": 10 |
| | | }, |
| | | "indices": 8, |
| | | "mode": 4, |
| | | "material": 1, |
| | | "extensions": { |
| | | "KHR_draco_mesh_compression": { |
| | | "bufferView": 3, |
| | | "attributes": { |
| | | "NORMAL": 0, |
| | | "POSITION": 1 |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "attributes": { |
| | | "NORMAL": 12, |
| | | "POSITION": 13 |
| | | }, |
| | | "indices": 11, |
| | | "mode": 4, |
| | | "material": 2, |
| | | "extensions": { |
| | | "KHR_draco_mesh_compression": { |
| | | "bufferView": 4, |
| | | "attributes": { |
| | | "NORMAL": 0, |
| | | "POSITION": 1 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | "name": "Cesium_Milk_Truck" |
| | | }, |
| | | { |
| | | "primitives": [ |
| | | { |
| | | "attributes": { |
| | | "NORMAL": 15, |
| | | "POSITION": 16, |
| | | "TEXCOORD_0": 17 |
| | | }, |
| | | "indices": 14, |
| | | "mode": 4, |
| | | "material": 3, |
| | | "extensions": { |
| | | "KHR_draco_mesh_compression": { |
| | | "bufferView": 5, |
| | | "attributes": { |
| | | "NORMAL": 0, |
| | | "POSITION": 1, |
| | | "TEXCOORD_0": 2 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | "name": "Wheels" |
| | | } |
| | | ], |
| | | "animations": [ |
| | | { |
| | | "channels": [ |
| | | { |
| | | "sampler": 0, |
| | | "target": { |
| | | "node": 4, |
| | | "path": "rotation" |
| | | } |
| | | }, |
| | | { |
| | | "sampler": 1, |
| | | "target": { |
| | | "node": 2, |
| | | "path": "rotation" |
| | | } |
| | | } |
| | | ], |
| | | "samplers": [ |
| | | { |
| | | "input": 0, |
| | | "interpolation": "LINEAR", |
| | | "output": 1 |
| | | }, |
| | | { |
| | | "input": 2, |
| | | "interpolation": "LINEAR", |
| | | "output": 3 |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | "accessors": [ |
| | | { |
| | | "bufferView": 0, |
| | | "byteOffset": 0, |
| | | "componentType": 5126, |
| | | "count": 31, |
| | | "max": [ |
| | | 1.25 |
| | | ], |
| | | "min": [ |
| | | 0 |
| | | ], |
| | | "type": "SCALAR" |
| | | }, |
| | | { |
| | | "bufferView": 1, |
| | | "byteOffset": 0, |
| | | "componentType": 5126, |
| | | "count": 31, |
| | | "max": [ |
| | | 0, |
| | | 0, |
| | | 0.9990190863609314, |
| | | 1 |
| | | ], |
| | | "min": [ |
| | | 0, |
| | | 0, |
| | | 0, |
| | | -0.9960774183273317 |
| | | ], |
| | | "type": "VEC4" |
| | | }, |
| | | { |
| | | "bufferView": 0, |
| | | "byteOffset": 124, |
| | | "componentType": 5126, |
| | | "count": 31, |
| | | "max": [ |
| | | 1.25 |
| | | ], |
| | | "min": [ |
| | | 0 |
| | | ], |
| | | "type": "SCALAR" |
| | | }, |
| | | { |
| | | "bufferView": 1, |
| | | "byteOffset": 496, |
| | | "componentType": 5126, |
| | | "count": 31, |
| | | "max": [ |
| | | 0, |
| | | 0, |
| | | 0.9990190863609314, |
| | | 1 |
| | | ], |
| | | "min": [ |
| | | 0, |
| | | 0, |
| | | 0, |
| | | -0.9960774183273317 |
| | | ], |
| | | "type": "VEC4" |
| | | }, |
| | | { |
| | | "componentType": 5123, |
| | | "count": 5232, |
| | | "max": [ |
| | | 1855 |
| | | ], |
| | | "min": [ |
| | | 0 |
| | | ], |
| | | "type": "SCALAR" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 1856, |
| | | "max": [ |
| | | 1, |
| | | 1, |
| | | 1 |
| | | ], |
| | | "min": [ |
| | | -1, |
| | | -1, |
| | | -1 |
| | | ], |
| | | "type": "VEC3" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 1856, |
| | | "max": [ |
| | | 2.437999963760376, |
| | | 2.5843698978424072, |
| | | 1.3960000276565552 |
| | | ], |
| | | "min": [ |
| | | -2.430910110473633, |
| | | 0.2667999863624573, |
| | | -1.3960000276565552 |
| | | ], |
| | | "type": "VEC3" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 1856, |
| | | "max": [ |
| | | 0.8964580297470093, |
| | | 0.997245192527771 |
| | | ], |
| | | "min": [ |
| | | 0.002956389915198088, |
| | | 0.015672028064727783 |
| | | ], |
| | | "type": "VEC2" |
| | | }, |
| | | { |
| | | "componentType": 5123, |
| | | "count": 168, |
| | | "max": [ |
| | | 71 |
| | | ], |
| | | "min": [ |
| | | 0 |
| | | ], |
| | | "type": "SCALAR" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 72, |
| | | "max": [ |
| | | 0.957480013370514, |
| | | 0.28850099444389343, |
| | | 1 |
| | | ], |
| | | "min": [ |
| | | -1, |
| | | 0, |
| | | -1 |
| | | ], |
| | | "type": "VEC3" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 72, |
| | | "max": [ |
| | | 1.6011799573898315, |
| | | 2.3545401096343994, |
| | | 1.3960000276565552 |
| | | ], |
| | | "min": [ |
| | | 0.22885000705718997, |
| | | 1.631850004196167, |
| | | -1.3960000276565552 |
| | | ], |
| | | "type": "VEC3" |
| | | }, |
| | | { |
| | | "componentType": 5123, |
| | | "count": 864, |
| | | "max": [ |
| | | 463 |
| | | ], |
| | | "min": [ |
| | | 0 |
| | | ], |
| | | "type": "SCALAR" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 464, |
| | | "max": [ |
| | | 1, |
| | | 1, |
| | | 1 |
| | | ], |
| | | "min": [ |
| | | -1, |
| | | -1, |
| | | -1 |
| | | ], |
| | | "type": "VEC3" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 464, |
| | | "max": [ |
| | | 1.62267005443573, |
| | | 2.3919999599456787, |
| | | 1.100000023841858 |
| | | ], |
| | | "min": [ |
| | | 0.1932000070810318, |
| | | 1.5961999893188477, |
| | | -1.1100000143051147 |
| | | ], |
| | | "type": "VEC3" |
| | | }, |
| | | { |
| | | "componentType": 5123, |
| | | "count": 2304, |
| | | "max": [ |
| | | 585 |
| | | ], |
| | | "min": [ |
| | | 0 |
| | | ], |
| | | "type": "SCALAR" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 586, |
| | | "max": [ |
| | | 0.9990389943122864, |
| | | 0.9990379810333252, |
| | | 1 |
| | | ], |
| | | "min": [ |
| | | -0.9990379810333252, |
| | | -0.9990379810333252, |
| | | -1 |
| | | ], |
| | | "type": "VEC3" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 586, |
| | | "max": [ |
| | | 0.4277999997138977, |
| | | 0.4277999997138977, |
| | | 1.0579999685287476 |
| | | ], |
| | | "min": [ |
| | | -0.4277999997138977, |
| | | -0.4277999997138977, |
| | | -1.0579999685287476 |
| | | ], |
| | | "type": "VEC3" |
| | | }, |
| | | { |
| | | "componentType": 5126, |
| | | "count": 586, |
| | | "max": [ |
| | | 0.9936569929122924, |
| | | 0.9895756244659424 |
| | | ], |
| | | "min": [ |
| | | 0.6050930023193359, |
| | | 0.00905001163482666 |
| | | ], |
| | | "type": "VEC2" |
| | | } |
| | | ], |
| | | "materials": [ |
| | | { |
| | | "pbrMetallicRoughness": { |
| | | "baseColorTexture": { |
| | | "index": 0 |
| | | }, |
| | | "metallicFactor": 0 |
| | | }, |
| | | "name": "truck" |
| | | }, |
| | | { |
| | | "pbrMetallicRoughness": { |
| | | "baseColorFactor": [ |
| | | 0, |
| | | 0.04050629958510399, |
| | | 0.021240700036287308, |
| | | 1 |
| | | ], |
| | | "metallicFactor": 0 |
| | | }, |
| | | "name": "glass" |
| | | }, |
| | | { |
| | | "pbrMetallicRoughness": { |
| | | "baseColorFactor": [ |
| | | 0.06400000303983688, |
| | | 0.06400000303983688, |
| | | 0.06400000303983688, |
| | | 1 |
| | | ], |
| | | "metallicFactor": 0 |
| | | }, |
| | | "name": "window_trim" |
| | | }, |
| | | { |
| | | "pbrMetallicRoughness": { |
| | | "baseColorTexture": { |
| | | "index": 1 |
| | | }, |
| | | "metallicFactor": 0 |
| | | }, |
| | | "name": "wheels" |
| | | } |
| | | ], |
| | | "textures": [ |
| | | { |
| | | "sampler": 0, |
| | | "source": 0 |
| | | }, |
| | | { |
| | | "sampler": 0, |
| | | "source": 0 |
| | | } |
| | | ], |
| | | "images": [ |
| | | { |
| | | "uri": "CesiumMilkTruck.png" |
| | | } |
| | | ], |
| | | "samplers": [ |
| | | { |
| | | "magFilter": 9729, |
| | | "minFilter": 9986, |
| | | "wrapS": 10497, |
| | | "wrapT": 10497 |
| | | } |
| | | ], |
| | | "bufferViews": [ |
| | | { |
| | | "buffer": 0, |
| | | "byteOffset": 0, |
| | | "byteLength": 248 |
| | | }, |
| | | { |
| | | "buffer": 0, |
| | | "byteOffset": 248, |
| | | "byteLength": 992 |
| | | }, |
| | | { |
| | | "buffer": 0, |
| | | "byteOffset": 1240, |
| | | "byteLength": 7871 |
| | | }, |
| | | { |
| | | "buffer": 0, |
| | | "byteOffset": 9111, |
| | | "byteLength": 474 |
| | | }, |
| | | { |
| | | "buffer": 0, |
| | | "byteOffset": 9585, |
| | | "byteLength": 1249 |
| | | }, |
| | | { |
| | | "buffer": 0, |
| | | "byteOffset": 10834, |
| | | "byteLength": 3137 |
| | | } |
| | | ], |
| | | "buffers": [ |
| | | { |
| | | "byteLength": 13971, |
| | | "uri": "CesiumMilkTruck.bin" |
| | | } |
| | | ], |
| | | "extensionsRequired": [ |
| | | "KHR_draco_mesh_compression" |
| | | ], |
| | | "extensionsUsed": [ |
| | | "KHR_draco_mesh_compression" |
| | | ] |
| | | } |
| | |
| | | $('.jimu-widget-Sign').hide(); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | |
| | | |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | |
| | | |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | |
| | | |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | |
| | | |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | |
| | | |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | |
| | | topic.publish('closeSign', 'Sign'); |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | $('.jimu-widget-MapPrinting').hide(); |
| | | |
| | | |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | |
| | | topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | |
| | | $('.jimu-widget-CoorPosition').hide(); |
| | | |
| | | |
| | | |
| | | |
| | | that.closefenxi(); |
| | | |
| | | |
| | |
| | | $(".jimu-widget-spatialAnalysis").show(); |
| | | }) |
| | | |
| | | // // 可视分析 |
| | | // $('.visibleArea-tool').click(function () { |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | |
| | | // $(".jimu-widget-visibleArea").show(); |
| | | // }) |
| | | // 剖面分析 |
| | | // $('.profileAnalysis-tool').click(function () { |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // // topic.publish('closep', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-slope").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | |
| | | // $(".jimu-widget-profileAnalysis").show(); |
| | | // }) |
| | | //坡度分析 |
| | | // $('.slope-tool').click(function () { |
| | | // that.map.scene.globe.depthTestAgainstTerrain = true; |
| | | // // 关闭量算 |
| | | // topic.publish('closeMeasurement', 'Measurement'); |
| | | // // 关闭卷帘 |
| | | // topic.publish('closeRolling', 'Rolling'); |
| | | // // 关闭分屏 |
| | | // topic.publish('closeSplitScreen', 'SplitScreen'); |
| | | // // 关闭标记 |
| | | // topic.publish('closeSign', 'Sign'); |
| | | // topic.publish('closeFlyRoute', 'FlyRoute'); |
| | | // $('.jimu-widget-CoorPosition').hide(); |
| | | // $('.jimu-widget-MapPrinting').hide(); |
| | | // // 关闭可视 |
| | | // topic.publish('closev', ''); |
| | | // // 关闭剖面 |
| | | // topic.publish('closep', ''); |
| | | // $(".jimu-widget-visibleArea").hide(); |
| | | // $(".jimu-widget-profileAnalysis").hide(); |
| | | // $('.tool-y-box').stop().hide(); |
| | | |
| | | // $(".jimu-widget-slope").show(); |
| | | // topic.publish('getbeginSlope', this.beginSlope); |
| | | // }) |
| | | |
| | | }, |
| | | |
| | | closeToolBox: function (item) { |
| | |
| | | } |
| | | }, |
| | | closefenxi: function () { |
| | | // 关闭可视 |
| | | topic.publish('closev', ''); |
| | | // 关闭剖面 |
| | | topic.publish('closep', ''); |
| | | // 关闭坡度 |
| | | topic.publish('closes', ''); |
| | | $(".jimu-widget-profileAnalysis").hide(); |
| | | $(".jimu-widget-slope").hide(); |
| | | $(".jimu-widget-visibleArea").hide(); |
| | | // 关闭空间分析页面 |
| | | $(".jimu-widget-spatialAnalysis").hide(); |
| | | //清除实体 |
| | | this.map.entities.removeAll(); |
| | | $(".jimu-widget-modelDiagram").hide(); |
| | | // 关闭空间分析子元素 |
| | | topic.publish('closeOnceUse'); |
| | | |
| | | |
| | | }, |
| | | onOpen: function () { |
| | |
| | | <input id="depth" type="number" value="500" required="required" style="width:90px;" /> |
| | | </div> |
| | | <div class="param-item"> |
| | | <button type="button" id="cleardigTheEarth" style="float:right;" class="button black">清除</button> |
| | | <button type="button" id="beginigTheEarth" class="button black">开挖</button> |
| | | <button type="button" id="cleardigTheEarth" class="button black">清除</button> |
| | | </div> |
| | | </div> |
| | | <i class="layui-icon closeOUR"> |
| | |
| | | that.closesDigTheEarth(); |
| | | }) |
| | | |
| | | // that.beginDigTheEarth(); |
| | | $("#beginigTheEarth").click(()=>{ |
| | | that.beginDigTheEarth(); |
| | | |
| | | }) |
| | | }, |
| | | beginDigTheEarth: function () { |
| | | var that = this |
| | |
| | | |
| | | .jimu-widget-digTheEarth #cleardigTheEarth:hover { |
| | | box-shadow: 2px 2px 20px -2px #1a8ff0; |
| | | } |
| | | |
| | | |
| | | .jimu-widget-digTheEarth #beginigTheEarth { |
| | | width: 60px; |
| | | height: 30px; |
| | | margin-top: 10px; |
| | | border: 1px solid transparent; |
| | | background-color: transparent; |
| | | cursor: pointer; |
| | | border-radius: 5px; |
| | | box-shadow: 2px 2px 15px -2px #39A5FD; |
| | | } |
| | | |
| | | .jimu-widget-digTheEarth #beginigTheEarth:hover { |
| | | box-shadow: 2px 2px 20px -2px #1a8ff0; |
| | | } |
| | |
| | | } |
| | | |
| | | .jimu-widget-legends .main { |
| | | max-height: 280px !important; |
| | | overflow: auto; |
| | | transition: all 0.5s; |
| | | max-height: 278px !important; |
| | | overflow: auto; |
| | | transition: all 0.5s; |
| | | } |
| | | |
| | | .jimu-widget-legends .main .m-init { |
| | |
| | | </tbody> |
| | | </table> |
| | | </div> --> |
| | | <div class="modelDiagramMain" > |
| | | <div id="modelDiagramCHONGFU" title="建议先点击单次添加"> |
| | | 输入重复多少: |
| | | <div> |
| | | <span>宽个数:</span> <input type="number" id="modelDiagramW" value="3" placeholder="经度"> |
| | | </div> |
| | | <div> |
| | | <span>宽间距:</span> <input type="number" id="modelDiagramJW" value="1" placeholder="经度"> |
| | | </div> |
| | | <div> |
| | | <span>长个数:</span> <input type="number" id="modelDiagramH" value="3" placeholder="经度"> |
| | | </div> |
| | | <div> |
| | | <span>长间距:</span> <input type="number" id="modelDiagramJH" value="1" placeholder="经度"> |
| | | </div> |
| | | <div style="position: relative;top:10px;"> |
| | | <button type="button" id="modelDYes" class="layui-btn layui-btn-normal" layui-btn-xs |
| | | style="border-radius: 5px;height:30px;line-height: 30px;">确定</button> |
| | | <button type="button" id="modelDNo" class="layui-btn layui-btn-danger" layui-btn-xs |
| | | style="border-radius: 5px;height:30px;line-height: 30px;">取消</button> |
| | | </div> |
| | | </div> |
| | | <div class="modelDiagramMain"> |
| | | <button class="layui-btn layui-btn-primary models"> |
| | | 人偶 |
| | | <i class="layui-icon layui-icon-down layui-font-12"></i> |
| | | </button> |
| | | <div class="inp"> |
| | | <input type="number" class="closemodoinput" id="modelDiagramjdu" value="116.00001" placeholder="经度"> |
| | | <input type="number" class="closemodoinput" id="modelDiagramwdu" value="29.00001" placeholder="纬度"> |
| | | <input type="number" class="closemodoinput" id="modelDiagramgdu" value="1000" placeholder="高度"> |
| | | <div> |
| | | <span>经度:</span> <input type="number" class="closemodoinput" id="modelDiagramjdu" value="116.00001" |
| | | placeholder="经度"> |
| | | </div> |
| | | <div> |
| | | <span>纬度:</span> <input type="number" class="closemodoinput" id="modelDiagramwdu" value="28.973468" |
| | | placeholder="经度"> |
| | | </div> |
| | | <div> |
| | | <span>高度:</span> <input type="number" class="closemodoinput" id="modelDiagramgdu" value="1000" placeholder="经度"> |
| | | </div> |
| | | </div> |
| | | <div class="seemodo">跟踪</div> |
| | | <div class="closemodo">添加/删除</div> |
| | |
| | | $('.jimu-widget-modelDiagram').find('.always').unbind("mousedown").bind("mousedown", function (event) { |
| | | if (event.which == 3) { |
| | | // console.log('you'); |
| | | that.getInput(); |
| | | var as = that.a - 0.00004 |
| | | , bs = that.b - 0.00004; |
| | | for (var i = 1; i <= 7; i++) { |
| | | var aa = as * 100000; |
| | | aa += i; |
| | | aa = aa / 100000; |
| | | for (var n = 1; n <= 6; n++) { |
| | | var bb = bs * 100000; |
| | | bb += n; |
| | | bb = bb / 100000; |
| | | // console.log(aa,bb) |
| | | that.always(aa, bb); |
| | | } |
| | | if ($("#modelDiagramCHONGFU").is(":hidden")) {//判断是否隐藏 |
| | | $('#modelDiagramCHONGFU').show(); |
| | | $('#modelDYes').click(() => { |
| | | that.getInput(); |
| | | var W = $('#modelDiagramW').val() |
| | | , H = $('#modelDiagramH').val() |
| | | , JW = $('#modelDiagramJW').val() |
| | | , JH = $('#modelDiagramJH').val() |
| | | , as = that.a - (0.00001 * ((+H + 1) / 2)) * JH |
| | | , bs = that.b - (0.00001 * ((+W + 1) / 2)) * JW; |
| | | for (var i = 1; i <= H; i++) { |
| | | var aa = as * 100000; |
| | | aa += i * JH; |
| | | aa = aa / 100000; |
| | | for (var n = 1; n <= W; n++) { |
| | | var bb = bs * 100000; |
| | | bb += n * JW; |
| | | bb = bb / 100000; |
| | | // console.log(aa,bb) |
| | | that.always(aa, bb); |
| | | } |
| | | } |
| | | }) |
| | | $('#modelDNo').click(() => { |
| | | $('#modelDiagramCHONGFU').hide(); |
| | | }) |
| | | } |
| | | |
| | | } else if (event.which == 1) { |
| | | // console.log('zuo'); |
| | | } |
| | | }); |
| | | |
| | | $('.jimu-widget-modelDiagram').find('.closesmodelDiagram').click(() => { |
| | | $('.jimu-widget-modelDiagram').hide(); |
| | | that.stopPlay(); |
| | | }) |
| | | //初演示 |
| | | layui.use(['dropdown', 'util', 'layer', 'table'], function () { |
| | | var dropdown = layui.dropdown |
| | | , layer = layui.layer; |
| | | dropdown.render({ |
| | | elem: '.models' |
| | | , data: [{ |
| | | title: '人偶' |
| | | , value: './images/gltf/Cesium_Man.glb' |
| | | , id: 100 |
| | | , num: [3, 3, 1, 1] |
| | | }, { |
| | | title: '飞机' |
| | | , value: './images/gltf/Cesium_Air.glb' |
| | | , id: 101 |
| | | , num: [3, 3, 30, 30] |
| | | }, { |
| | | title: '飞机2' |
| | | , value: './images/gltf/CesiumDrone.glb' |
| | | , id: 102 |
| | | , num: [3, 3, 7, 7] |
| | | }, { |
| | | title: '装甲车' |
| | | , value: './images/gltf/GroundVehicle.glb' |
| | | , id: 103 |
| | | , num: [3, 3, 4, 9] |
| | | }, { |
| | | title: '热气球' |
| | | , value: './images/gltf/CesiumBalloon.glb' |
| | | , id: 104 |
| | | , num: [3, 3, 1, 1] |
| | | }, { |
| | | title: '牛奶车' |
| | | , value: './images/gltf/CesiumMilkTruck.glb' |
| | | , id: 105 |
| | | , num: [3, 3, 1, 1] |
| | | }, { |
| | | title: '牛奶车gltf' |
| | | , value: './images/gltf/CesiumMilkTruck.gltf' |
| | | , id: 106 |
| | | , num: [3, 3, 1, 1] |
| | | }, { |
| | | title: '人gltf' |
| | | , value: './images/gltf/walk.gltf' |
| | | , id: 107 |
| | | , num: [3, 3, 1, 1] |
| | | } |
| | | ] |
| | | , click: function (obj) { |
| | | layer.tips('选择了:' + obj.title, this.elem, { tips: [1, '#5FB878'] }); |
| | | that.urls = obj.value; |
| | | var dom = $('.models'); |
| | | dom.empty(); |
| | | var str = `${obj.title} <i class="layui-icon layui-icon-down layui-font-12"></i>` |
| | | dom.append(str); |
| | | that.setNum(obj.num) |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | }, |
| | | beginCesium: function (a = 116.058987, b = 28.973468, g = 1000, once = 'always') { |
| | | urls: './images/gltf/Cesium_Man.glb', |
| | | setNum: function (num) { |
| | | $('#modelDiagramW').val(num[0]) |
| | | $('#modelDiagramH').val(num[1]) |
| | | $('#modelDiagramJW').val(num[2]) |
| | | $('#modelDiagramJH').val(num[3]) |
| | | }, |
| | | beginCesium: function (a, b, g, once) { |
| | | var viewer = this.map |
| | | , that = this |
| | | , url = "./images/gltf/Cesium_Man.glb"; |
| | | , url = that.urls; |
| | | |
| | | //静态 |
| | | // var position = Cesium.Cartesian3.fromDegrees(116.058987, 28.973468, 1000); |
| | |
| | | .jimu-widget-modelDiagram { |
| | | position: absolute !important; |
| | | font-size: 14px; |
| | | height: 120px !important; |
| | | height: 180px !important; |
| | | width: 280px !important; |
| | | /* 240px */ |
| | | background: rgb(254, 254, 254); |
| | |
| | | |
| | | .jimu-widget-modelDiagram .modelDiagramMain { |
| | | width: 230px; |
| | | height: 110px; |
| | | height: 160px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | position: absolute; |
| | | top: 1.5px; |
| | | left: 10px; |
| | | top: 8px; |
| | | left: 15px; |
| | | cursor: pointer; |
| | | } |
| | | .jimu-widget-modelDiagram .modelDiagramMain button{ |
| | | line-height: 12px; |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .inp { |
| | |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .inp .closemodoinput { |
| | | width: 200px; |
| | | width: 180px; |
| | | } |
| | | |
| | | .jimu-widget-modelDiagram .but { |
| | |
| | | |
| | | .jimu-widget-modelDiagram .closesmodelDiagram:hover { |
| | | color: red; |
| | | } |
| | | |
| | | #modelDiagramCHONGFU{ |
| | | z-index: 20; |
| | | position: absolute; |
| | | top: 180px; |
| | | left: 140px; |
| | | width: 170px; |
| | | height: 150px; |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | border-radius: 5px ; |
| | | box-shadow: 0px 0px 5px #378ef1; |
| | | display: none; |
| | | } |
| | | |
| | | #modelDiagramCHONGFU input{ |
| | | width: 80px; |
| | | } |
| | |
| | | |
| | | }, |
| | | beginNull: function () { |
| | | console.log('kaishi'); |
| | | console.log(`${this.name}--kaishi`); |
| | | var that = this; |
| | | |
| | | }, |
| | | closesNull: function (froms) { |
| | | console.log('guanbi'); |
| | | console.log(`${this.name}--guanbi`); |
| | | }, |
| | | onOpen: function () { |
| | | |
| | |
| | | |
| | | .jimu-widget-null .closeOUR:hover { |
| | | color: red; |
| | | } |
| | | } |
| | | |
| | | /* .jimu-widget-null .but { |
| | | line-height: 30px; |
| | | width: 80px; |
| | | height: 30px; |
| | | font-size: 16px; |
| | | border-radius: 5px; |
| | | box-shadow: 2px 2px 15px -5px #378ef1; |
| | | border: 1px solid transparent; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .jimu-widget-null .but:hover { |
| | | box-shadow: 2px 2px 25px -5px #1679eb; |
| | | } */ |
| | |
| | | } |
| | | |
| | | .jimu-widget-profileAnalysis #toolbar #chooseViews:hover, .jimu-widget-profileAnalysis #toolbar #clears:hover { |
| | | background-color: #3E9FFC; |
| | | box-shadow: 3px 3px 20px -4px #000000; |
| | | filter: grayscale(100%) brightness(200%); |
| | | box-shadow: 3px 3px 20px -5px #1a8fee; |
| | | } |
| | | |
| | | .jimu-widget-profileAnalysis #toolbar .closes { |
| | |
| | | <div> |
| | | <div class="ccsliu"></div> |
| | | <div id="i-f-gjz" class="input-font" |
| | | style="border-radius: 5px 0 0px 5px;width:4.7rem;background-color: #3E9FFC;color: #fff;">关键字</div> |
| | | <div id="i-f-zb" class="input-font" style="width:3.5rem">坐标</div> |
| | | <!-- <input type="text" placeholder="输入关键字以搜索" class="input-sm /> --> |
| | | <input id="local_data" autocomplete="off" data-provide="typeahead" type="text" class="input-sms" |
| | | <input id="local_data" autocomplete="off" data-provide="typeahead" type="text" class="input-sms" |
| | | placeholder="输入关键字以搜索: 鄱阳湖" /> |
| | | <div id="inputTwo"> |
| | | <input id="local_data1" autocomplete="off" data-provide="typeahead" type="number" class="input-sms1" |
| | |
| | | startup: function () { |
| | | var that = this; |
| | | |
| | | function createTooltip(frameDiv) {//抄录createTooltip函数 |
| | | |
| | | var tooltip = function (frameDiv) { |
| | | |
| | | var div = document.createElement('DIV'); |
| | | div.className = "twipsy right"; |
| | | |
| | | var arrow = document.createElement('DIV'); |
| | | arrow.className = "twipsy-arrow"; |
| | | div.appendChild(arrow); |
| | | |
| | | var title = document.createElement('DIV'); |
| | | title.className = "twipsy-inner"; |
| | | div.appendChild(title); |
| | | |
| | | this._div = div; |
| | | this._title = title; |
| | | this.message = ''; |
| | | |
| | | // add to frame div and display coordinates |
| | | frameDiv.appendChild(div); |
| | | var that = this; |
| | | div.onmousemove = function (evt) { |
| | | that.showAt({ x: evt.clientX, y: evt.clientY }, that.message); |
| | | }; |
| | | }; |
| | | |
| | | tooltip.prototype.setVisible = function (visible) { |
| | | this._div.style.display = visible ? 'block' : 'none'; |
| | | }; |
| | | |
| | | tooltip.prototype.showAt = function (position, message) { |
| | | if (position && message) { |
| | | this.setVisible(true); |
| | | this._title.innerHTML = message; |
| | | this._div.style.left = position.x + 10 + "px"; |
| | | this._div.style.top = (position.y - this._div.clientHeight / 2) + "px"; |
| | | this.message = message; |
| | | } |
| | | }; |
| | | |
| | | return new tooltip(frameDiv); |
| | | } |
| | | window.MYcreateTooltip = createTooltip;//全局使用 |
| | | |
| | | //关键词&&坐标 |
| | | $("#i-f-gjz").click(function () { |
| | | that.states = 'one'; |
| | |
| | | this.mountainHandler.setInputAction(lang.hitch(this, this.clickHand), Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | }, |
| | | // 注册鼠标左键单击事件 |
| | | clickHand: function clickHand(data) { |
| | | clickHand: function clickHand(data) {// 全局鼠标点击图标事件 渲染地图图标时 添加个相对应的数组储存该对象数据 通过数组是否存在判断点击的项目 |
| | | var pickedObjects = this.map.scene.drillPick(data.position) || 0; |
| | | // console.log(pickedObjects); |
| | | if (pickedObjects.length != 0) { |
| | |
| | | |
| | | } else if (pickedObjects[0].primitive.id.SQLData != undefined) {//SQL查询图标点击事件 |
| | | // console.log('SQLData') |
| | | } else if (pickedObjects[0].primitive.id.spatialQueryData != undefined) {//SQL查询图标点击事件 |
| | | var data = pickedObjects[0].primitive.id.spatialQueryData; |
| | | data.name = pickedObjects[0].primitive.id.name; |
| | | data.dom = pickedObjects[0].primitive.id.description; |
| | | // console.log(data); |
| | | var doms = $('#spatialQueryValuemain'); |
| | | var domo = $('#spatialQueryValue'); |
| | | doms.empty(); |
| | | doms.append('<div>name:' + data.name + '<div/>' + data.dom._value); |
| | | domo.show(); |
| | | } |
| | | } |
| | | } |
| | |
| | | align-items: center; |
| | | } |
| | | |
| | | .jimu-widget-searchL .ccsliu { |
| | | position: fixed; |
| | | top: 0; |
| | | background-color: transparent; |
| | | width: 20px; |
| | | height: 20px; |
| | | cursor: help; |
| | | } |
| | | |
| | | .jimu-widget-searchL .input-font { |
| | | /* width: 3rem; */ |
| | | height: 35px; |
| | |
| | | height: calc(100% - 40px); |
| | | } |
| | | |
| | | .jimu-widget-searchL .searchLMain .layui-tab-content .layui-tab-item, |
| | | .jimu-widget-searchL .searchLMain .layui-tab-content .layui-tab-item .layui-form { |
| | | .jimu-widget-searchL .searchLMain .layui-tab-content .layui-tab-item, .jimu-widget-searchL .searchLMain .layui-tab-content .layui-tab-item .layui-form { |
| | | height: 100%; |
| | | } |
| | | |
| | |
| | | border-left: 1px solid rgba(0, 0, 0, .2); |
| | | } |
| | | |
| | | .jimu-widget-searchL .input-sms1::-webkit-input-placeholder, |
| | | .jimu-widget-searchL .input-sms::-webkit-input-placeholder { |
| | | .jimu-widget-searchL .input-sms1::-webkit-input-placeholder, .jimu-widget-searchL .input-sms::-webkit-input-placeholder { |
| | | color: #afafaf; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .jimu-widget-searchL .input-sms1::-moz-placeholder, |
| | | .jimu-widget-searchL .input-sms::-moz-placeholder { |
| | | .jimu-widget-searchL .input-sms1::-moz-placeholder, .jimu-widget-searchL .input-sms::-moz-placeholder { |
| | | /* Mozilla Firefox 19+ */ |
| | | color: #afafaf; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .jimu-widget-searchL .input-sms1:-moz-placeholder, |
| | | .jimu-widget-searchL .input-sms:-moz-placeholder { |
| | | .jimu-widget-searchL .input-sms1:-moz-placeholder, .jimu-widget-searchL .input-sms:-moz-placeholder { |
| | | /* Mozilla Firefox 4 to 18 */ |
| | | color: #afafaf; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .jimu-widget-searchL .input-sms1::-ms-input-placeholder, |
| | | .jimu-widget-searchL .input-sms::-ms-input-placeholder { |
| | | .jimu-widget-searchL .input-sms1::-ms-input-placeholder, .jimu-widget-searchL .input-sms::-ms-input-placeholder { |
| | | color: #afafaf; |
| | | font-size: 14px; |
| | | } |
| | |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .jimu-widget-searchL .layui-tab-brief>.layui-tab-more li.layui-this:after, |
| | | .layui-tab-brief>.layui-tab-title .layui-this:after { |
| | | .jimu-widget-searchL .layui-tab-brief>.layui-tab-more li.layui-this:after, .layui-tab-brief>.layui-tab-title .layui-this:after { |
| | | border-bottom: 2px solid #39A5FD; |
| | | } |
| | | |
| | |
| | | position: relative; |
| | | top: -4px; |
| | | } */ |
| | | |
| | | .jimu-widget-searchL .searchLMain [id^='layui-table-page'] { |
| | | position: absolute; |
| | | left: 20px; |
| | |
| | | } |
| | | |
| | | /* 隐藏layui表格溢出的详情框 */ |
| | | .layui-table-grid-down{ |
| | | display: none; |
| | | |
| | | .layui-table-grid-down { |
| | | display: none; |
| | | } |
| | |
| | | var that = this; |
| | | // 暴露在外的接口 |
| | | |
| | | function createTooltip(frameDiv) {//抄录createTooltip函数 |
| | | topic.subscribe("closeOnceUse", lang.hitch(this, this.closeOnceUse)); |
| | | |
| | | var tooltip = function (frameDiv) { |
| | | // function createTooltip(frameDiv) {//抄录createTooltip函数 |
| | | |
| | | var div = document.createElement('DIV'); |
| | | div.className = "twipsy right"; |
| | | // var tooltip = function (frameDiv) { |
| | | |
| | | var arrow = document.createElement('DIV'); |
| | | arrow.className = "twipsy-arrow"; |
| | | div.appendChild(arrow); |
| | | // var div = document.createElement('DIV'); |
| | | // div.className = "twipsy right"; |
| | | |
| | | var title = document.createElement('DIV'); |
| | | title.className = "twipsy-inner"; |
| | | div.appendChild(title); |
| | | // var arrow = document.createElement('DIV'); |
| | | // arrow.className = "twipsy-arrow"; |
| | | // div.appendChild(arrow); |
| | | |
| | | this._div = div; |
| | | this._title = title; |
| | | this.message = ''; |
| | | // var title = document.createElement('DIV'); |
| | | // title.className = "twipsy-inner"; |
| | | // div.appendChild(title); |
| | | |
| | | // add to frame div and display coordinates |
| | | frameDiv.appendChild(div); |
| | | var that = this; |
| | | div.onmousemove = function (evt) { |
| | | that.showAt({ x: evt.clientX, y: evt.clientY }, that.message); |
| | | }; |
| | | }; |
| | | // this._div = div; |
| | | // this._title = title; |
| | | // this.message = ''; |
| | | |
| | | tooltip.prototype.setVisible = function (visible) { |
| | | this._div.style.display = visible ? 'block' : 'none'; |
| | | }; |
| | | // // add to frame div and display coordinates |
| | | // frameDiv.appendChild(div); |
| | | // var that = this; |
| | | // div.onmousemove = function (evt) { |
| | | // that.showAt({ x: evt.clientX, y: evt.clientY }, that.message); |
| | | // }; |
| | | // }; |
| | | |
| | | tooltip.prototype.showAt = function (position, message) { |
| | | if (position && message) { |
| | | this.setVisible(true); |
| | | this._title.innerHTML = message; |
| | | this._div.style.left = position.x + 10 + "px"; |
| | | this._div.style.top = (position.y - this._div.clientHeight / 2) + "px"; |
| | | this.message = message; |
| | | } |
| | | }; |
| | | // tooltip.prototype.setVisible = function (visible) { |
| | | // this._div.style.display = visible ? 'block' : 'none'; |
| | | // }; |
| | | |
| | | return new tooltip(frameDiv); |
| | | } |
| | | window.MYcreateTooltip = createTooltip;//全局使用 |
| | | // tooltip.prototype.showAt = function (position, message) { |
| | | // if (position && message) { |
| | | // this.setVisible(true); |
| | | // this._title.innerHTML = message; |
| | | // this._div.style.left = position.x + 10 + "px"; |
| | | // this._div.style.top = (position.y - this._div.clientHeight / 2) + "px"; |
| | | // this.message = message; |
| | | // } |
| | | // }; |
| | | |
| | | // return new tooltip(frameDiv); |
| | | // } |
| | | // window.MYcreateTooltip = createTooltip;//全局使用 |
| | | |
| | | var domHtmls = [//默认 |
| | | { |
| | |
| | | |
| | | that.beginSpatialAnalysis(domHtmls); |
| | | var isit = false; |
| | | $('.ccslius').click(() => { |
| | | isit = false; |
| | | }) |
| | | $('.ccsliu').dblclick(() => {//测试开关 点击图例其他的图片 |
| | | |
| | | if (isit) { |
| | |
| | | name: '地形开挖', |
| | | classs: 'digTheEarth-tool', |
| | | img: './images/addL/pdpx.png' |
| | | }, {//方量分析//做好 |
| | | name: '方量分析', |
| | | classs: 'volumeAnalysis-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | , {//空间查询 |
| | | name: '空间查询', |
| | | classs: 'spatialQuery-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | , |
| | | {//建造模型 |
| | |
| | | {//清除模型 |
| | | name: '清除模型', |
| | | classs: 'modesssss2222', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | , {//地形开挖,//做好 |
| | | name: '地形开挖', |
| | | classs: 'digTheEarth-tool', |
| | | img: './images/addL/pdpx.png' |
| | | }, {//方量分析//做好 |
| | | name: '方量分析', |
| | | classs: 'volumeAnalysis-tool', |
| | | img: './images/addL/pdpx.png' |
| | | } |
| | | ]; |
| | |
| | | $('.digTheEarth-tool').click(function () { |
| | | that.closeOnceUse('digTheEarth'); |
| | | $(".jimu-widget-digTheEarth").show(); |
| | | topic.publish('beginDigTheEarth', 'beginDigTheEarth'); |
| | | // topic.publish('beginDigTheEarth', 'beginDigTheEarth'); |
| | | |
| | | }) |
| | | |
| | |
| | | that.closeOnceUse('volumeAnalysis'); |
| | | $(".jimu-widget-volumeAnalysis").show(); |
| | | topic.publish('beginVolumeAnalysis', 'beginVolumeAnalysis'); |
| | | }) |
| | | |
| | | //空间查询 |
| | | $('.spatialQuery-tool').click(function () { |
| | | that.closeOnceUse(); |
| | | $(".jimu-widget-spatialQuery").show(); |
| | | topic.publish('beginSpatialQuery', 'beginSpatialQuery'); |
| | | }) |
| | | |
| | | }, |
| | |
| | | if ($(".jimu-widget-digTheEarth").is(":visible")) {//判断是否隐藏 |
| | | $(".jimu-widget-digTheEarth").hide(); |
| | | topic.publish('closesDigTheEarth'); |
| | | console.log('dakai ') |
| | | } |
| | | |
| | | //关闭方量贩分析 |
| | | if ($(".jimu-widget-volumeAnalysis").is(":visible")) {//判断是否隐藏 |
| | | $(".jimu-widget-volumeAnalysis").hide(); |
| | | topic.publish('closesVolumeAnalysis'); |
| | | } |
| | | |
| | | //关闭空间查询 |
| | | if ($(".jimu-widget-spatialQuery").is(":visible")) {//判断是否隐藏 |
| | | $(".jimu-widget-spatialQuery").hide(); |
| | | topic.publish('closesSpatialQuery'); |
| | | } |
| | | |
| | | |
| | | }, |
| New file |
| | |
| | | <div title="点击绘画区域,右键结束"> |
| | | <div id='loadingbar' class="spinner"> |
| | | <div class="spinner-container container1"> |
| | | <div class="circle1"></div> |
| | | <div class="circle2"></div> |
| | | <div class="circle3"></div> |
| | | <div class="circle4"></div> |
| | | </div> |
| | | <div class="spinner-container container2"> |
| | | <div class="circle1"></div> |
| | | <div class="circle2"></div> |
| | | <div class="circle3"></div> |
| | | <div class="circle4"></div> |
| | | </div> |
| | | <div class="spinner-container container3"> |
| | | <div class="circle1"></div> |
| | | <div class="circle2"></div> |
| | | <div class="circle3"></div> |
| | | <div class="circle4"></div> |
| | | </div> |
| | | </div> |
| | | <div id="toolbarSpatialQuery" style="position: absolute;left: 5px;top: 5px;display: block;"> |
| | | <button type="button" id="searchSpatialQuery" class="button black">绘画查询区域</button> |
| | | </div> |
| | | <i class="layui-icon closeOUR"> |
| | | ဆ |
| | | </i></span> |
| | | <div id="spatialQueryValue" title="数据展示"> |
| | | <div id="spatialQueryValuemain"></div> |
| | | <i class="layui-icon closeOURspatialQueryValue"> |
| | | ဆ |
| | | </i></span> |
| | | </div> |
| | | </div> |
| New file |
| | |
| | | define([ |
| | | 'dojo/_base/declare', |
| | | 'dojo/_base/lang', |
| | | 'dojo/_base/array', |
| | | 'dojo/_base/html', |
| | | 'dojo/topic', |
| | | 'jimu/BaseWidget', |
| | | ], |
| | | function (declare, |
| | | lang, |
| | | array, |
| | | html, |
| | | topic, |
| | | BaseWidget |
| | | ) { |
| | | return declare([BaseWidget], { |
| | | baseClass: 'jimu-widget-spatialQuery', |
| | | name: 'spatialQuery', |
| | | flag: false, |
| | | startup: function () { |
| | | var that = this; |
| | | topic.subscribe("beginSpatialQuery", lang.hitch(this, this.beginSpatialQuery)); |
| | | topic.subscribe("closesSpatialQuery", lang.hitch(this, this.closesSpatialQuery)); |
| | | // topic.publish('getbeginSlope', that.beginSlope); |
| | | $(`.${that.baseClass}`).find('.closeOUR').click(() => { |
| | | $(`.${that.baseClass}`).hide(); |
| | | that.closesSpatialQuery(); |
| | | }) |
| | | |
| | | $(`.${that.baseClass}`).find('.closeOURspatialQueryValue').click(() => { |
| | | $(`#spatialQueryValue`).hide(); |
| | | $(`#spatialQueryValuemain`).empty(); |
| | | }) |
| | | |
| | | |
| | | // that.beginSpatialQuery(); |
| | | |
| | | }, |
| | | beginSpatialQuery: function () { |
| | | console.log(`${this.name}--kaishi`); |
| | | var that = this |
| | | , viewer = that.map; |
| | | |
| | | |
| | | var scene = viewer.scene; |
| | | scene.shadowMap.darkness = 1.275; //设置第二重烘焙纹理的效果(明暗程度) |
| | | scene.skyAtmosphere.brightnessShift = 0.4; //修改大气的亮度 |
| | | scene.debugShowFramesPerSecond = false; |
| | | scene.hdrEnabled = false; |
| | | scene.sun.show = false; |
| | | // 01设置环境光的强度-新处理CBD场景 |
| | | scene.lightSource.ambientLightColor = new Cesium.Color(0.65, 0.65, 0.65, 1); |
| | | // 添加光源 |
| | | var position1 = new Cesium.Cartesian3.fromDegrees(116.261209157595, 39.3042238956531, 480); |
| | | //光源方向点 |
| | | |
| | | var targetPosition1 = new Cesium.Cartesian3.fromDegrees(116.261209157595, 39.3042238956531, 430); |
| | | var dirLightOptions = { |
| | | targetPosition: targetPosition1, |
| | | color: new Cesium.Color(1.0, 1.0, 1.0, 1), |
| | | intensity: 0.55 |
| | | }; |
| | | directionalLight_1 = new Cesium.DirectionalLight(position1, dirLightOptions); |
| | | scene.addLightSource(directionalLight_1); |
| | | var widget = viewer.cesiumWidget; |
| | | var IDs = []; |
| | | var dataUrl = "http://www.supermapol.com/realspace/services/data-cbd/rest/data/featureResults.rjson?returnContent=true"; |
| | | |
| | | |
| | | $('#loadingbar').remove(); |
| | | // try { |
| | | var promise = scene.open('http://www.supermapol.com/realspace/services/3D-CBDCache20200416/rest/realspace'); |
| | | Cesium.when(promise, function (layer) { |
| | | //设置相机位置、视角,便于观察场景 |
| | | scene.camera.setView({ |
| | | destination: new Cesium.Cartesian3.fromDegrees(116.4566, 39.9149, 5323.445971240632), |
| | | orientation: { |
| | | heading: 0, |
| | | pitch: -1.5188, |
| | | roll: 6.283185307179563 |
| | | } |
| | | }); |
| | | var handlerPolygon = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Polygon); |
| | | var tooltip = window.MYcreateTooltip(document.body); |
| | | $("#searchSpatialQuery").click(function () { |
| | | // console.log(1) |
| | | handlerPolygon.activate(); |
| | | // console.log(2) |
| | | }); |
| | | handlerPolygon.activeEvt.addEventListener(function (isActive) { |
| | | if (isActive == true) { |
| | | viewer.enableCursorStyle = false; |
| | | viewer._element.style.cursor = ''; |
| | | $('body').removeClass('drawCur').addClass('drawCur'); |
| | | } else { |
| | | viewer.enableCursorStyle = true; |
| | | $('body').removeClass('drawCur'); |
| | | } |
| | | }); |
| | | handlerPolygon.movingEvt.addEventListener(function (windowPosition) { |
| | | if (windowPosition.x < 210 && windowPosition.y < 120) { |
| | | tooltip.setVisible(false); |
| | | return; |
| | | } |
| | | if (handlerPolygon.isDrawing) { |
| | | tooltip.showAt(windowPosition, '<p>点击确定查询区域中间点</p><p>右键单击结束绘制</p>'); |
| | | } else { |
| | | tooltip.showAt(windowPosition, '<p>点击绘制查询区域第一个点</p>'); |
| | | } |
| | | }); |
| | | handlerPolygon.drawEvt.addEventListener(function (result) { |
| | | tooltip.setVisible(false); |
| | | handlerPolygon.polygon.show = false; |
| | | handlerPolygon.polyline.show = false; |
| | | |
| | | var positions = result.object.positions; |
| | | |
| | | var geometries = []; |
| | | for (var i = 0; i < positions.length; i++) { |
| | | var position = positions[i]; |
| | | var cartographic = Cesium.Cartographic.fromCartesian(position); |
| | | var longitude = Cesium.Math.toDegrees(cartographic.longitude); |
| | | var latitude = Cesium.Math.toDegrees(cartographic.latitude); |
| | | |
| | | var queryPoint = { // 查询点对象 |
| | | x: longitude, |
| | | y: latitude |
| | | }; |
| | | geometries.push(queryPoint) |
| | | } |
| | | |
| | | |
| | | query(geometries); |
| | | }); |
| | | }, function () { |
| | | var title = '加载SCP失败,请检查网络连接状态或者url地址是否正确?'; |
| | | widget.showErrorPanel(title, undefined, e); |
| | | }); |
| | | // } catch (e) { |
| | | // if (widget._showRenderLoopErrors) { |
| | | // var title = '渲染时发生错误,已停止渲染。'; |
| | | // widget.showErrorPanel(title, undefined, e); |
| | | // } |
| | | // } |
| | | |
| | | function processCompleted(features) { |
| | | var selectedFeatures = features; |
| | | // console.log(selectedFeatures); |
| | | var color; |
| | | IDs = []; |
| | | viewer.entities.removeAll(); |
| | | for (var i = 0; i < selectedFeatures.length; i++) { |
| | | var value = selectedFeatures[i].fieldValues["0"]; |
| | | var feature = selectedFeatures[i]; |
| | | for (var j = 0; j < feature.fieldNames.length; j++) { |
| | | var index = j.toString(); |
| | | if (j == 0) { |
| | | var des = '<table class="cesium-infoBox-defaultTable"><tbody>' + '<tr><th>' + selectedFeatures[i].fieldNames["0"] + '</th><td>' + selectedFeatures[i].fieldValues["0"] + '</td></tr>'; |
| | | } else if (j == feature.fieldNames.length - 1) { |
| | | des += '<tr><th>' + selectedFeatures[i].fieldNames[index] + '</th><td>' + selectedFeatures[i].fieldValues[index] + '</td></tr>' + "</tbody></table>"; |
| | | } else { |
| | | des += '<tr><th>' + selectedFeatures[i].fieldNames[index] + '</th><td>' + selectedFeatures[i].fieldValues[index] + '</td></tr>'; |
| | | } |
| | | } |
| | | viewer.entities.add({ |
| | | position: Cesium.Cartesian3.fromDegrees(parseFloat(selectedFeatures[i].fieldValues["12"]), parseFloat(selectedFeatures[i].fieldValues["13"]), parseFloat(selectedFeatures[i].fieldValues["16"])), |
| | | billboard: { |
| | | image: './images/addL/dworgin.png', |
| | | width: 30, |
| | | height: 40, |
| | | |
| | | }, |
| | | name: selectedFeatures[i].fieldValues["11"], |
| | | description: des, |
| | | spatialQueryData: selectedFeatures[i] |
| | | }); |
| | | IDs.push(parseInt(value) + 11); |
| | | } |
| | | // console.log(des); |
| | | var buildingLayer = scene.layers.find("Building@CBD"); |
| | | if (IDs.length > 0) { |
| | | buildingLayer.setSelection(IDs); |
| | | } |
| | | } |
| | | |
| | | function query(queryPoints) { |
| | | var queryObj = { |
| | | "getFeatureMode": "SPATIAL", |
| | | "spatialQueryMode": "CONTAIN", |
| | | "datasetNames": ["二维数据:Building"], |
| | | "geometry": { |
| | | // id: 0, |
| | | // style: null, |
| | | // parts: [queryPoints.length], |
| | | points: queryPoints, |
| | | type: "REGION" |
| | | } |
| | | }; |
| | | |
| | | var queryData = JSON.stringify(queryObj); // 转化为JSON字符串作为查询参数 |
| | | |
| | | $.ajax({ |
| | | type: "post", |
| | | url: dataUrl, |
| | | data: queryData, |
| | | success: function (result) { |
| | | var resultObj = JSON.parse(result); |
| | | // console.log(resultObj); |
| | | if (resultObj.featureCount > 0) { |
| | | processCompleted(resultObj.features); |
| | | } |
| | | }, |
| | | error: function (msg) { |
| | | console.log(msg); |
| | | }, |
| | | // complete: function () { |
| | | // console.log("complete"); |
| | | // } |
| | | }) |
| | | } |
| | | |
| | | function processFailed(e) { |
| | | alert(e.error.errorMsg); |
| | | } |
| | | |
| | | that.promise = promise; |
| | | }, |
| | | promise: '', |
| | | closesSpatialQuery: function (froms) { |
| | | var that = this |
| | | , viewer = that.map; |
| | | viewer.entities.removeAll(); |
| | | $(`#spatialQueryValue`).hide(); |
| | | $(`#spatialQueryValuemain`).empty(); |
| | | |
| | | Cesium.when(that.promise, function (layer) { |
| | | for (var i = 0; i < layer.length; i++) { |
| | | that.map.scene.layers.remove(layer[i].name) |
| | | } |
| | | }) |
| | | |
| | | console.log(`${this.name}--guanbi`); |
| | | }, |
| | | onOpen: function () { |
| | | |
| | | }, |
| | | |
| | | onClose: function () { |
| | | //面板关闭的时候触发 (when this panel is closed trigger) |
| | | console.log('jies') |
| | | }, |
| | | |
| | | onMinimize: function () { |
| | | this.resize(); |
| | | }, |
| | | |
| | | onMaximize: function () { |
| | | this.resize(); |
| | | }, |
| | | |
| | | resize: function () { |
| | | |
| | | }, |
| | | |
| | | destroy: function () { |
| | | //销毁的时候触发 |
| | | //todo |
| | | //do something before this func |
| | | this.inherited(arguments); |
| | | } |
| | | |
| | | }); |
| | | }); |
| New file |
| | |
| | | .jimu-widget-spatialQuery { |
| | | position: fixed !important; |
| | | top: 72px !important; |
| | | right: 388px !important; |
| | | width: 160px !important; |
| | | height: 40px !important; |
| | | background-color: rgb(255, 255, 255); |
| | | font-size: 14px; |
| | | color: rgb(0, 0, 0); |
| | | z-index: 12 !important; |
| | | border-radius: 10px; |
| | | display: none; |
| | | box-shadow: 0 0 8px #fff; |
| | | padding: 0px 5px !important; |
| | | } |
| | | |
| | | .jimu-widget-spatialQuery .closeOUR { |
| | | position: absolute; |
| | | right: 5px; |
| | | top: calc(50% - 9px); |
| | | font-size: 18px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .jimu-widget-spatialQuery .closeOUR:hover { |
| | | color: red; |
| | | } |
| | | |
| | | .jimu-widget-spatialQuery #searchSpatialQuery { |
| | | line-height: 30px; |
| | | width: 120px; |
| | | height: 30px; |
| | | font-size: 16px; |
| | | border-radius: 5px; |
| | | box-shadow: 2px 2px 15px -5px #378ef1; |
| | | border: 1px solid transparent; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .jimu-widget-spatialQuery #searchSpatialQuery:hover { |
| | | box-shadow: 2px 2px 25px -5px #1679eb; |
| | | } |
| | | |
| | | .jimu-widget-spatialQuery #spatialQueryValue { |
| | | width: 320px; |
| | | height: 320px; |
| | | background-color: #fff; |
| | | position: relative; |
| | | top: 50px; |
| | | left: -165px; |
| | | box-shadow: 0 0 8px #fff; |
| | | border-radius: 10px; |
| | | padding: 8px; |
| | | display: none; |
| | | } |
| | | |
| | | .jimu-widget-spatialQuery .closeOURspatialQueryValue { |
| | | position: absolute; |
| | | right: 5px; |
| | | top: 5px; |
| | | font-size: 18px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .jimu-widget-spatialQuery .closeOURspatialQueryValue:hover { |
| | | color: red; |
| | | } |
| New file |
| | |
| | | { |
| | | "name": "spatialQuery", |
| | | "2D": true, |
| | | "3D": true, |
| | | "platform": "HTML", |
| | | "version": "2.10", |
| | | "wabVersion": "2.10", |
| | | "author": "liuyg", |
| | | "description": "", |
| | | "copyright": "", |
| | | "license": "", |
| | | "properties": { |
| | | "hasConfig": false, |
| | | "inPanel": false, |
| | | "hasVersionManager": false |
| | | } |
| | | } |
| New file |
| | |
| | | define( |
| | | ({ |
| | | _widgetLabel: "spatialQuery" |
| | | }) |
| | | ); |
| New file |
| | |
| | | define({ |
| | | root: ({ |
| | | _widgetLabel: "spatialQuery" |
| | | }), |
| | | "es": 1, |
| | | "zh-cn": 1 |
| | | }); |
| New file |
| | |
| | | define( |
| | | ({ |
| | | _widgetLabel: "空间查询" |
| | | }) |
| | | ); |
| | |
| | | } |
| | | |
| | | .jimu-widget-visibleArea #toolbar #chooseView:hover, .jimu-widget-visibleArea #toolbar #clear:hover { |
| | | background-color: #3E9FFC; |
| | | box-shadow: 3px 3px 20px -4px #000000; |
| | | filter: grayscale(100%) brightness(200%); |
| | | box-shadow: 3px 3px 20px -5px #1696ff; |
| | | } |
| | | |
| | | .jimu-widget-visibleArea #toolbar .closes { |