北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
lixuliang
2024-01-19 1de23a596f1457db2ea9861645a568e779d7664f
src/components/leftMenu/sousuo.vue
@@ -80,8 +80,8 @@
            <div style="font-size: 0.12rem; color: black">
              <!-- <span>地址:{{ item.address ? item.address : "暂无详细地址" }}</span><br />
              <span>电话:{{ item.telphone ? item.telphone : "暂无联系方式" }}</span> -->
              <span>区域:{{ item.area ? item.area : "暂无区域信息" }}</span
              ><br />
              <!-- <span>区域:{{ item.area ? item.area : "暂无区域信息" }}</span> -->
              <!-- <br /> -->
              <span
                >地址:{{ item.address ? item.address : "暂无详细地址" }}</span
              >
@@ -283,15 +283,26 @@
              pname: "",
              resType: "",
            }),
            // 市级平台
            // // 市级平台(百度:会查到外地)
            // axios.get(common.poiserve, {
            //   params: {
            //     request: "bdPoi",
            //     query: this.poi_text,
            //     output: "json",
            //     coord: "cgcs2000",
            //     page_num: 0,
            //     page_size: 20,
            //   },
            // }),
            //  市级平台(高德)
            axios.get(common.poiserve, {
              params: {
                request: "bdPoi",
                query: this.poi_text,
                request: "GdPoi",
                keywords: this.poi_text,
                output: "json",
                coord: "cgcs2000",
                page_num: 0,
                page_size: 20,
                offset: 20,
                page: 1,
              },
            }),
          ])
@@ -311,22 +322,43 @@
                  });
              }
              // 市级平台
              if (data[1].data.status == 0) {
                data[1].data.results.forEach((val) => {
              // // 百度
              // if (data[1].data.status == 0) {
              //   data[1].data.results.forEach((val) => {
              //     let obj = {
              //       address: val.address,
              //       adname: val.area,
              //       cityname: val.city,
              //       id: val.uid,
              //       lat: val.location.lat,
              //       lng: val.location.lng,
              //       name: val.name,
              //       pname: val.province,
              //     };
              //     Allresults.push(obj);
              //   });
              // }
              // 高德
              if (data[1].data.status == 1) {
                data[1].data.pois.forEach((val) => {
                  let poiarr = val.location.split(",");
                  let poi = {
                    lon: parseFloat(poiarr[0]),
                    lat: parseFloat(poiarr[1]),
                  };
                  let obj = {
                    address: val.address,
                    adname: val.area,
                    cityname: val.city,
                    id: val.uid,
                    lat: val.location.lat,
                    lng: val.location.lng,
                    lat: poi.lat,
                    lng: poi.lon,
                    name: val.name,
                    pname: val.province,
                  };
                  Allresults.push(obj);
                });
              }
              this.total = Allresults.length;
              this.poiList = Allresults;
              this.showList = true;
@@ -363,11 +395,11 @@
        billboard: {
          verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
          scale: 1,
          // image: window.SmartEarthRootUrl + "/Workers/image/mark.png",
          image: window.SmartEarthRootUrl + "/Workers/image/mark.png",
          heightReference: 1,
          disableDepthTestDistance: Number.POSITIVE_INFINITY,
        },
        properties:item
      });
      // 如果是地块,添加范围线
      if (item.type == "大兴用地") {