Merge branch 'master' of http://106.120.22.35:48888/r/PM20221203225_MobileWeb
| | |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <div class="ssjg" v-show="ssjgxs">请输入关键词搜索地图</div> |
| | | <div class="ssjg" v-show="ssjgxs">未搜索到结果</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | // data.data && data.data.pois; |
| | | //115接口 |
| | | if (data[0].status == 200) { |
| | | data[0].data.data.res |
| | | .filter((item) => { |
| | | return item.name.includes(this.poi_text); |
| | | }) |
| | | .forEach((val) => { |
| | | Allresults.push(val); |
| | | }); |
| | | data[0].data.data.res && |
| | | data[0].data.data.res |
| | | .filter((item) => { |
| | | return item.name.includes(this.poi_text); |
| | | }) |
| | | .forEach((val) => { |
| | | Allresults.push(val); |
| | | }); |
| | | } |
| | | // 市级平台 |
| | | // // 百度 |
| | |
| | | // } |
| | | // 高德 |
| | | if (data[1].data.status == 1) { |
| | | data[1].data.pois |
| | | .filter((item) => { |
| | | return ( |
| | | item.pname.includes("北京") && |
| | | item.name.includes(this.poi_text) |
| | | ); |
| | | }) |
| | | .forEach((val) => { |
| | | let poiarr = val.location.split(","); |
| | | let poi = { |
| | | lon: parseFloat(poiarr[0]), |
| | | lat: parseFloat(poiarr[1]), |
| | | }; |
| | | let obj = { |
| | | adcode: val.adcode, |
| | | address: val.address, |
| | | adname: val.area, |
| | | citycode: val.citycode, |
| | | cityname: val.cityname, |
| | | id: val.uid, |
| | | lat: poi.lat, |
| | | lng: poi.lon, |
| | | name: val.name, |
| | | pcode: val.pcode, |
| | | pname: val.province, |
| | | type: val.type, |
| | | typecode: val.typecode, |
| | | }; |
| | | Allresults.push(obj); |
| | | }); |
| | | data[1].data.pois && |
| | | data[1].data.pois |
| | | .filter((item) => { |
| | | return ( |
| | | item.pname.includes("北京") && |
| | | item.name.includes(this.poi_text) |
| | | ); |
| | | }) |
| | | .forEach((val) => { |
| | | let poiarr = val.location.split(","); |
| | | let poi = { |
| | | lon: parseFloat(poiarr[0]), |
| | | lat: parseFloat(poiarr[1]), |
| | | }; |
| | | let obj = { |
| | | adcode: val.adcode, |
| | | address: val.address, |
| | | adname: val.area, |
| | | citycode: val.citycode, |
| | | cityname: val.cityname, |
| | | id: val.uid, |
| | | lat: poi.lat, |
| | | lng: poi.lon, |
| | | name: val.name, |
| | | pcode: val.pcode, |
| | | pname: val.province, |
| | | type: val.type, |
| | | typecode: val.typecode, |
| | | }; |
| | | Allresults.push(obj); |
| | | }); |
| | | } |
| | | this.total = Allresults.length; |
| | | this.poiList = Allresults; |
| | |
| | | .then((res) => { |
| | | // 高德 |
| | | if (res.data.status == 1) { |
| | | res.data.pois |
| | | .filter((item) => { |
| | | return ( |
| | | item.pname.includes("北京") && |
| | | item.name.includes(this.poi_text) |
| | | ); |
| | | }) |
| | | .forEach((val) => { |
| | | let poiarr = val.location.split(","); |
| | | let poi = { |
| | | lon: parseFloat(poiarr[0]), |
| | | lat: parseFloat(poiarr[1]), |
| | | }; |
| | | let obj = { |
| | | adcode: val.adcode, |
| | | address: val.address, |
| | | adname: val.area, |
| | | citycode: val.citycode, |
| | | cityname: val.cityname, |
| | | id: val.uid, |
| | | lat: poi.lat, |
| | | lng: poi.lon, |
| | | name: val.name, |
| | | pcode: val.pcode, |
| | | pname: val.province, |
| | | type: val.type, |
| | | typecode: val.typecode, |
| | | }; |
| | | Allresults.push(obj); |
| | | }); |
| | | res.data.pois && |
| | | res.data.pois |
| | | .filter((item) => { |
| | | var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g"); |
| | | return ( |
| | | item.pname.includes("北京") && |
| | | item.name.includes(this.poi_text) && |
| | | !reg.test(item.typecode) |
| | | ); |
| | | }) |
| | | .forEach((val) => { |
| | | let poiarr = val.location.split(","); |
| | | let poi = { |
| | | lon: parseFloat(poiarr[0]), |
| | | lat: parseFloat(poiarr[1]), |
| | | }; |
| | | let obj = { |
| | | adcode: val.adcode, |
| | | address: val.address, |
| | | adname: val.area, |
| | | citycode: val.citycode, |
| | | cityname: val.cityname, |
| | | id: val.uid, |
| | | lat: poi.lat, |
| | | lng: poi.lon, |
| | | name: val.name, |
| | | pcode: val.pcode, |
| | | pname: val.province, |
| | | type: val.type, |
| | | typecode: val.typecode, |
| | | }; |
| | | Allresults.push(obj); |
| | | }); |
| | | } |
| | | this.total = Allresults.length; |
| | | this.poiList = Allresults; |
| | |
| | | }) |
| | | .then((res) => { |
| | | if (res.status == 200) { |
| | | res.data.data.res |
| | | .filter((item) => { |
| | | return item.name.includes(this.poi_text); |
| | | }) |
| | | .forEach((val) => { |
| | | Allresults.push(val); |
| | | }); |
| | | res.data.data.res && |
| | | res.data.data.res |
| | | .filter((item) => { |
| | | // 判断地块是否有汉字 |
| | | var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g"); |
| | | return ( |
| | | item.name.includes(this.poi_text) && |
| | | reg.test(item.typecode) |
| | | ); |
| | | }) |
| | | .forEach((val) => { |
| | | Allresults.push(val); |
| | | }); |
| | | } |
| | | this.total = Allresults.length; |
| | | this.poiList = Allresults; |
| | |
| | | let view = new View({ |
| | | center: olProj.fromLonLat([4.606512, 2.621472]), |
| | | zoom: 13, |
| | | enableRotation: false, |
| | | }); |
| | | var topResolution = 896.0859375; |
| | | var resolutions = []; |
| | |
| | | handleFuncClick(index) { |
| | | if (this.curFuncIndex == index) { |
| | | store.setTdglFlag(false); |
| | | store.setSliderShow(false); |
| | | store.setPoplayerListAction({}); |
| | | divPoint3 && divPoint3.deleteObject(); |
| | | store.setPoplayerShowAction(false); |
| | |
| | | this.curFuncIndex = -1; |
| | | window.clusterLayer && window.clusterLayer.clear(); |
| | | if (window.tdglLayer) { |
| | | store.setSliderShow(false); |
| | | sgworld.Creator.DeleteObject(window.tdglLayer); |
| | | } |
| | | } else { |
| | |
| | | store.setMenuListShow(false); |
| | | // 隐藏底部漫游面板 |
| | | store.setRoamPanelShow(false); |
| | | //显示滑动条 |
| | | store.setSliderShow(true); |
| | | this.curFuncIndex = index; |
| | | switch (index) { |
| | | case 0: |
| | | store.setSliderShow(true); |
| | | window.tdglLayer = sgworld.Creator.createImageryProvider( |
| | | layers[8].name, |
| | | "tms", |
| | |
| | | true, |
| | | "" |
| | | ); |
| | | //显示滑动条 |
| | | store.setTdglFlag(true); |
| | | break; |
| | | case 1: |
| | | this.curFuncIndex = -1; |
| | | store.setTdglFlag(false); |
| | | if (window.tdglLayer) { |
| | | store.setSliderShow(false); |
| | | sgworld.Creator.DeleteObject(window.tdglLayer); |
| | | } |
| | | store.setHistoryShow(true); |
| | |
| | | "basicMapChecked.val": { |
| | | handler: function (newVal, oldVal) { |
| | | if (newVal == "三维模型") { |
| | | debugger |
| | | debugger; |
| | | this.handleSMapClick( |
| | | { |
| | | id: "swmx", |