| | |
| | | } |
| | | } else { |
| | | if (that.searchDatas[0] && that.searchDatas[1]) { |
| | | that.map.camera.flyTo({ |
| | | // destination: Cesium.Cartesian3.fromDegrees(Number(lng), Number(lat), Number(gaodu)) |
| | | destination: Cesium.Cartesian3.fromDegrees(Number(that.searchDatas[0]), Number(that.searchDatas[1]), Number(8000)) |
| | | |
| | | }); |
| | | } else { |
| | | layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){ |
| | | //得到各种内置组件 |
| | |
| | | that.map.entities.removeAll(); |
| | | }) |
| | | |
| | | $("#local_data").keyup(function (e) { |
| | | console.log(e); |
| | | that.getInputData(); |
| | | if (e.keyCode == 13 && typeof that.searchDatas == 'string') { |
| | | var han = /^[\u4e00-\u9fa5]+$/; |
| | | if (han.test(that.searchDatas) || that.searchDatas == ' ') { |
| | | that.getData(0, that.searchDatas); |
| | | $('.searchLMain').show(); |
| | | $('.searchLMain').find('ul.layui-tab-title li:eq(0)').addClass('layui-this').siblings().removeClass('layui-this'); |
| | | $('.searchLMain').find('div.layui-tab-content > div.layui-tab-item:eq(0)').addClass('layui-show').siblings().removeClass('layui-show'); |
| | | |
| | | } else { |
| | | layui.use(function () { //亦可加载特定模块:layui.use(['layer', 'laydate', function(){ |
| | | //得到各种内置组件 |
| | | var layer = layui.layer //弹层 |
| | | // layer.msg('请先填写关键字', { icon: 1, time: 1000, shift: 6 }); |
| | | layer.tips('请先填写关键字', '.searchImg', { |
| | | tips: [2, '#FF5722'] |
| | | }); |
| | | }) |
| | | $('.searchLMain').hide(); |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | getInputData: function () { |
| | | if (this.states == 'one') { |