diff --git a/src/views/DialogTabs/component/streetscape.vue b/src/views/DialogTabs/component/streetscape.vue index 24477a2..dfe9163 100644 --- a/src/views/DialogTabs/component/streetscape.vue +++ b/src/views/DialogTabs/component/streetscape.vue @@ -1,10 +1,10 @@ @@ -21,7 +21,6 @@ // 初始化街景地图 const initePanoramaMap = () => { AllData.panorama = BMapGL.Panorama('streetscape'); - AllData.panorama.setPov({ // 修改全景的视角 pitch: 10, @@ -33,28 +32,28 @@ }); }; //根据中心点查找poi -const searchPoiByLonlat = async () => { - let poiData = await request({ - url: `/bdApi/baiduservice/placeSearch`, - method: 'GET', - params: { - location: `${AllData.poiCircle[1]},${AllData.poiCircle[0]}`, - radius: 200, - query: '公交站$商场$著名景点$学校', - }, - }); - if (poiData & poiData.data.length) { - console.log('poiData---', poiData); - element.image = getStreetImg([element.location.lng, element.location.lat]); - poiData.data.forEach(element => { - AllData.poiImages.push({ - name: element.name, - lonlat: [element.location.lng, element.location.lat], - imagesUrl: element.image, - }); - }); - } -}; +// const searchPoiByLonlat = async () => { +// let poiData = await request({ +// url: `/bdApi/baiduservice/placeSearch`, +// method: 'GET', +// params: { +// location: `${AllData.poiCircle[1]},${AllData.poiCircle[0]}`, +// radius: 200, +// query: '公交站$商场$著名景点$学校', +// }, +// }); +// if (poiData & poiData.data.length) { +// console.log('poiData---', poiData); +// element.image = getStreetImg([element.location.lng, element.location.lat]); +// poiData.data.forEach(element => { +// AllData.poiImages.push({ +// name: element.name, +// lonlat: [element.location.lng, element.location.lat], +// imagesUrl: element.image, +// }); +// }); +// } +// }; //获取全景静态图 const getStreetImg = async lonlat => { let data = await request({ @@ -86,7 +85,7 @@ AllData.panorama.setPosition( new BMapGL.Point(position_Street.geometry.coordinates[0], position_Street.geometry.coordinates[1]) ); - searchPoiByLonlat(); + //searchPoiByLonlat(); gcoord.transform(position_Street, gcoord.BD09, gcoord.WGS84); }); }); diff --git a/src/views/DialogTabs/component/streetscape.vue b/src/views/DialogTabs/component/streetscape.vue index 24477a2..dfe9163 100644 --- a/src/views/DialogTabs/component/streetscape.vue +++ b/src/views/DialogTabs/component/streetscape.vue @@ -1,10 +1,10 @@ @@ -21,7 +21,6 @@ // 初始化街景地图 const initePanoramaMap = () => { AllData.panorama = BMapGL.Panorama('streetscape'); - AllData.panorama.setPov({ // 修改全景的视角 pitch: 10, @@ -33,28 +32,28 @@ }); }; //根据中心点查找poi -const searchPoiByLonlat = async () => { - let poiData = await request({ - url: `/bdApi/baiduservice/placeSearch`, - method: 'GET', - params: { - location: `${AllData.poiCircle[1]},${AllData.poiCircle[0]}`, - radius: 200, - query: '公交站$商场$著名景点$学校', - }, - }); - if (poiData & poiData.data.length) { - console.log('poiData---', poiData); - element.image = getStreetImg([element.location.lng, element.location.lat]); - poiData.data.forEach(element => { - AllData.poiImages.push({ - name: element.name, - lonlat: [element.location.lng, element.location.lat], - imagesUrl: element.image, - }); - }); - } -}; +// const searchPoiByLonlat = async () => { +// let poiData = await request({ +// url: `/bdApi/baiduservice/placeSearch`, +// method: 'GET', +// params: { +// location: `${AllData.poiCircle[1]},${AllData.poiCircle[0]}`, +// radius: 200, +// query: '公交站$商场$著名景点$学校', +// }, +// }); +// if (poiData & poiData.data.length) { +// console.log('poiData---', poiData); +// element.image = getStreetImg([element.location.lng, element.location.lat]); +// poiData.data.forEach(element => { +// AllData.poiImages.push({ +// name: element.name, +// lonlat: [element.location.lng, element.location.lat], +// imagesUrl: element.image, +// }); +// }); +// } +// }; //获取全景静态图 const getStreetImg = async lonlat => { let data = await request({ @@ -86,7 +85,7 @@ AllData.panorama.setPosition( new BMapGL.Point(position_Street.geometry.coordinates[0], position_Street.geometry.coordinates[1]) ); - searchPoiByLonlat(); + //searchPoiByLonlat(); gcoord.transform(position_Street, gcoord.BD09, gcoord.WGS84); }); }); diff --git a/src/views/oneMap/index.vue b/src/views/oneMap/index.vue index d46b388..7f3544e 100644 --- a/src/views/oneMap/index.vue +++ b/src/views/oneMap/index.vue @@ -536,7 +536,7 @@ gcoord.transform(clickPoint, gcoord.WGS84, gcoord.BD09); console.log('clickPoint---', clickPoint, clickPoint.geometry.coordinates); let data = await request({ - url: `/bdApi/baiduservice/panorama`, + url: `/bdApi//baiduservice/panorama`, method: 'GET', params: { location: `${clickPoint.geometry.coordinates[0]},${clickPoint.geometry.coordinates[1]}`,