| | |
| | | this.StreetScapeOption.getImageInfo = this.streetSphere_data.getImageInfo; |
| | | } |
| | | |
| | | // 初始化街景 |
| | | init() { |
| | | this.exit() |
| | | this.sgworld.Navigate.Stop(); //取消飞行状态 |
| | | |
| | | this.StreetView = this.sgworld.Analysis.StreetViewOpen({ |
| | | lon: this.streetSphere_data.lon, |
| | | lat: this.streetSphere_data.lat |
| | |
| | | this.setOpacity(this.streetscape_alpha); |
| | | } |
| | | |
| | | //退出街景 |
| | | exit() { |
| | | if (this.StreetView) { |
| | | this.StreetView.exit(); |
| | |
| | | this.exitContainer && this.exitContainer.remove(); |
| | | this.sliderContainer = this.exitContainer = undefined |
| | | } |
| | | } |
| | | |
| | | // 跳转位置 |
| | | changePosition(position) { |
| | | this.streetSphere_data.lon = position.lon; |
| | | this.streetSphere_data.lat = position.lat; |
| | | this.StreetView.StreetViewData.isTwoTextures = false; |
| | | this.StreetView.StreetViewData.isThreeTextures = false; |
| | | this.StreetScapeOption.flyTime = 1; |
| | | this.init(); |
| | | } |
| | | |
| | | // 更新服务 |
| | | changeServer(StreetUrl) { |
| | | this.streetSphere_data.StreetUrl = StreetUrl; |
| | | this.streetSphere_data.getImageRootUrl = StreetUrl + "/Image3DResourceService/GetImageTile/?ImageID="; |
| | | this.streetSphere_data.getImageInfo = StreetUrl + '/Image3DResourceService/GetImageInfo/?ImageID='; |
| | | this.StreetView.StreetViewData.isTwoTextures = false; |
| | | this.StreetView.StreetViewData.isThreeTextures = false; |
| | | this.setStreetScapeUrl(); |
| | | this.StreetScapeOption.flyTime = 1; |
| | | this.init(); |
| | | } |
| | | |
| | | // 下一步 |
| | | nextStep() { |
| | | let linkImageData = this.StreetView.StreetViewData.linkImagesData.find(item => { |
| | | return item.type === "next" |
| | | }) |
| | | linkImageData && this.StreetView.MoveToLinkImage(linkImageData); |
| | | } |
| | | |
| | | // 上一步 |
| | | prevStep() { |
| | | let linkImageData = this.StreetView.StreetViewData.linkImagesData.find(item => { |
| | | return item.type === "prev" |
| | | }) |
| | | linkImageData && this.StreetView.MoveToLinkImage(linkImageData); |
| | | } |
| | | |
| | | //设置街景球透明度 |