pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <tfoot id='WSUby'></tfoot>

      <i id='WSUby'><tr id='WSUby'><dt id='WSUby'><q id='WSUby'><span id='WSUby'><b id='WSUby'><form id='WSUby'><ins id='WSUby'></ins><ul id='WSUby'></ul><sub id='WSUby'></sub></form><legend id='WSUby'></legend><bdo id='WSUby'><pre id='WSUby'><center id='WSUby'></center></pre></bdo></b><th id='WSUby'></th></span></q></dt></tr></i><div class="kh3l2dn" id='WSUby'><tfoot id='WSUby'></tfoot><dl id='WSUby'><fieldset id='WSUby'></fieldset></dl></div>
        <legend id='WSUby'><style id='WSUby'><dir id='WSUby'><q id='WSUby'></q></dir></style></legend>

      1. <small id='WSUby'></small><noframes id='WSUby'>

        • <bdo id='WSUby'></bdo><ul id='WSUby'></ul>

        用谷歌街景面對目標建筑

        Facing the targeted building with Google StreetView(用谷歌街景面對目標建筑)

        <legend id='co1Kr'><style id='co1Kr'><dir id='co1Kr'><q id='co1Kr'></q></dir></style></legend>
        <i id='co1Kr'><tr id='co1Kr'><dt id='co1Kr'><q id='co1Kr'><span id='co1Kr'><b id='co1Kr'><form id='co1Kr'><ins id='co1Kr'></ins><ul id='co1Kr'></ul><sub id='co1Kr'></sub></form><legend id='co1Kr'></legend><bdo id='co1Kr'><pre id='co1Kr'><center id='co1Kr'></center></pre></bdo></b><th id='co1Kr'></th></span></q></dt></tr></i><div class="rkxt8lk" id='co1Kr'><tfoot id='co1Kr'></tfoot><dl id='co1Kr'><fieldset id='co1Kr'></fieldset></dl></div>

        <small id='co1Kr'></small><noframes id='co1Kr'>

          • <bdo id='co1Kr'></bdo><ul id='co1Kr'></ul>
            <tfoot id='co1Kr'></tfoot>
              <tbody id='co1Kr'></tbody>

                  本文介紹了用谷歌街景面對目標建筑的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我的問題很簡單.

                  我需要 heading 值才能知道如何定位 POV.

                  I need the heading value to know how to target the POV.

                  sv.getPanoramaByLocation() 在這種情況下返回一個 data 變量,其中包含兩個箭頭的 heading ,您可以在哪個方向上走得更遠.

                  sv.getPanoramaByLocation() in this case returns a data variable containing the heading of both the arrows in which direction you can go further.

                  然而,它沒有給我heading 值,用于查看建筑物的方式.但是可以在街景中使用標記來定位您的建筑物!示例

                  However it doesn't give me the heading value for which way to look at the building. However it is possible to use a marker in streetview to target your building! example

                  誰能幫我解決這個問題?我可以制作任何你想要的垃圾.

                  Can anyone help me with this? I can make whatever dump you people want.

                  推薦答案

                  對您要查看"的建筑物地址進行地理編碼.使用幾何庫computeHeading(from:LatLng, to:LatLng) 函數計算街景位置和建筑物之間的方向.

                  Geocode the address of the building you want to "look at". Use the geometry library computeHeading(from:LatLng, to:LatLng) function to calculate the heading between the StreetView location and the building.

                  (假設地理編碼器返回屋頂"地理編碼)

                  (assumes that the geocoder returns a "rooftop" geocode)

                  示例(自由女神像)

                  另一種選擇,使用路線服務:

                  相關問題:請求主路街景全景圖而不是來自 API 的小巷

                  使用路線服務獲取道路上的位置以用于街景相機"位置的代碼片段(現在效果更好,您可以返回內部"街景位置):

                  code snippet that uses the directions service to get a location on the road to use for street view "camera" location (works better now that you can get "interior" streetview locations returned):

                  var map;
                  var berkeley = new google.maps.LatLng(37.869085, -122.254775);
                  var sv = new google.maps.StreetViewService();
                  var geocoder = new google.maps.Geocoder();
                  var directionsService = new google.maps.DirectionsService();
                  var panorama;
                  var myLatLng;
                  var address = "525 Beacon St. Boston, MA";
                  
                  function initialize() {
                  
                    panorama = new google.maps.StreetViewPanorama(document.getElementById("pano"));
                  
                  
                    directionsService.route({
                      origin: address,
                      destination: address,
                      travelMode: google.maps.TravelMode.DRIVING
                    }, function(response, status) {
                      if (status == google.maps.DirectionsStatus.OK) {
                        // myLatLng = response.routes[0].legs[0].start_location;
                        sv.getPanoramaByLocation(response.routes[0].legs[0].start_location, 50, processSVData);
                  
                        var marker = new google.maps.Marker({
                        position: response.routes[0].legs[0].start_location,
                        map: map,
                        title: "Directions"
                      });
                        map.setCenter(myLatLng);
                  
                  } else document.getElementById('info').innerHTML += "status:"+status+"<br>";
                    });
                  
                    geocoder.geocode({
                      'address': address
                    }, geocoderCallback);
                    
                    // Set up the map
                    var myOptions = {
                      zoom: 15
                    };
                  
                    map = new google.maps.Map(document.getElementById('map_canvas'),
                      myOptions);
                  }
                  google.maps.event.addDomListener(window, 'load', initialize);
                  
                  function processSVData(data, status) {
                    if (status == google.maps.StreetViewStatus.OK) {
                  
                      panorama.setPano(data.location.pano);
                      var camera = new google.maps.Marker({
                        position: data.location.latLng,
                        map: map,
                        draggable: true,
                        title: "camera"
                      });
                      var heading = google.maps.geometry.spherical.computeHeading(data.location.latLng, myLatLng);
                      document.getElementById('info').innerHTML += "heading:"+heading+"<br>"
                      + "location: "+myLatLng.toUrlValue(6)+"<br>"
                      + "camera:"+data.location.latLng.toUrlValue(6)+"<br>";
                      
                      
                      // alert(data.location.latLng+":"+myLatLng+":"+heading);
                      panorama.setPov({
                        heading: heading,
                        pitch: 0,
                        zoom: 1
                      });
                      panorama.setVisible(true);
                    } else {
                      alert("Street View data not found for this location.");
                    }
                  }
                  
                  function geocoderCallback(results, status) {
                    if (status == google.maps.GeocoderStatus.OK) {
                      myLatLng = results[0].geometry.location;
                      map.setCenter(myLatLng);
                      if (results[0].geometry.viewport) map.fitBounds(results[0].geometry.viewport);
                      else if (results[0].geometry.bounds) map.fitBounds(results[0].geometry.bounds);
                      else map.setZoom(15);
                      var marker = new google.maps.Marker({
                        position: myLatLng,
                        map: map,
                        title: address
                      });    
                  
                    } else {
                      alert("Geocode was not successful for the following reason: " + status);
                    }
                  };

                  html,
                  body {
                    height: 100%;
                    margin: 0;
                    padding: 0;
                  }
                  #map_canvas {
                    height: 100%;
                  }

                  <script src="http://maps.googleapis.com/maps/api/js?libraries=geometry"></script>
                  
                  <div id="pano" style="width: 425px; height: 400px;float:left"></div>
                  <div id="info"></div>
                  
                  <div id="map_canvas" style="width: 425px; height: 400px;float:left"></div>
                  <div id="map_center"></div>
                  <div id="streetview_pov"></div>

                  這篇關于用谷歌街景面對目標建筑的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)

                    <legend id='1YQut'><style id='1YQut'><dir id='1YQut'><q id='1YQut'></q></dir></style></legend>
                      <bdo id='1YQut'></bdo><ul id='1YQut'></ul>
                          <tbody id='1YQut'></tbody>

                      1. <i id='1YQut'><tr id='1YQut'><dt id='1YQut'><q id='1YQut'><span id='1YQut'><b id='1YQut'><form id='1YQut'><ins id='1YQut'></ins><ul id='1YQut'></ul><sub id='1YQut'></sub></form><legend id='1YQut'></legend><bdo id='1YQut'><pre id='1YQut'><center id='1YQut'></center></pre></bdo></b><th id='1YQut'></th></span></q></dt></tr></i><div class="ja8cr3k" id='1YQut'><tfoot id='1YQut'></tfoot><dl id='1YQut'><fieldset id='1YQut'></fieldset></dl></div>
                        • <tfoot id='1YQut'></tfoot>

                          <small id='1YQut'></small><noframes id='1YQut'>

                            主站蜘蛛池模板: 齿式联轴器-弹性联轴器-联轴器厂家-江苏诺兴传动联轴器制造有限公司 | 亿立分板机_曲线_锯片式_走刀_在线式全自动_铣刀_在线V槽分板机-杭州亿协智能装备有限公司 | 玻璃钢罐_玻璃钢储罐_盐酸罐厂家-河北华盛节能设备有限公司 | 苹果售后维修点查询,苹果iPhone授权售后维修服务中心 – 修果网 拼装地板,悬浮地板厂家,悬浮式拼装运动地板-石家庄博超地板科技有限公司 | 脉冲布袋除尘器_除尘布袋-泊头市净化除尘设备生产厂家 | 影像测量仪_三坐标测量机_一键式二次元_全自动影像测量仪-广东妙机精密科技股份有限公司 | 私人别墅家庭影院系统_家庭影院音响_家庭影院装修设计公司-邦牛影音 | 高压微雾加湿器_工业加湿器_温室喷雾-昌润空气净化设备 | 高硼硅玻璃|水位计玻璃板|光学三棱镜-邯郸奥维玻璃科技有限公司 高温高压釜(氢化反应釜)百科 | 东莞动力锂电池保护板_BMS智能软件保护板_锂电池主动均衡保护板-东莞市倡芯电子科技有限公司 | ph计,实验室ph计,台式ph计,实验室酸度计,台式酸度计 | 膜片万向弹性联轴器-冲压铸造模具「沧州昌运模具」 | 彩超机-黑白B超机-便携兽用B超机-多普勒彩超机价格「大为彩超」厂家 | 济南品牌包装设计公司_济南VI标志设计公司_山东锐尚文化传播 | 珠海白蚁防治_珠海灭鼠_珠海杀虫灭鼠_珠海灭蟑螂_珠海酒店消杀_珠海工厂杀虫灭鼠_立净虫控防治服务有限公司 | 杜甫仪器官网|实验室平行反应器|升降水浴锅|台式低温循环泵 | 扒渣机厂家_扒渣机价格_矿用扒渣机_铣挖机_撬毛台车_襄阳永力通扒渣机公司 | 苏州防水公司_厂房屋面外墙防水_地下室卫生间防水堵漏-苏州伊诺尔防水工程有限公司 | 根系分析仪,大米外观品质检测仪,考种仪,藻类鉴定计数仪,叶面积仪,菌落计数仪,抑菌圈测量仪,抗生素效价测定仪,植物表型仪,冠层分析仪-杭州万深检测仪器网 | 电动垃圾车,垃圾清运车-江苏速利达机车有限公司 | 充气膜专家-气膜馆-PTFE膜结构-ETFE膜结构-商业街膜结构-奥克金鼎 | 微型实验室真空泵-无油干式真空泵-微型涡旋耐腐蚀压缩机-思科涡旋科技(杭州)有限公司 | 电线电缆厂家|沈阳电缆厂|电线厂|沈阳英联塑力线缆有限公司 | 铝合金脚手架厂家-专注高空作业平台-深圳腾达安全科技 | 长城人品牌官网 | 杭州月嫂技术培训服务公司-催乳师培训中心报名费用-产后康复师培训机构-杭州优贝姆健康管理有限公司 | 自动气象站_农业气象站_超声波气象站_防爆气象站-山东万象环境科技有限公司 | 沈阳建筑设计公司_加固改造设计_厂房设计_设计资质加盟【金辉设计】 | 体检车_移动CT车_CT检查车_CT车_深圳市艾克瑞电气有限公司移动CT体检车厂家-深圳市艾克瑞电气有限公司 | 有机废气处理-rto焚烧炉-催化燃烧设备-VOC冷凝回收装置-三梯环境 | 纯水设备_苏州皙全超纯水设备水处理设备生产厂家 | 西安标准厂房_陕西工业厂房_西咸新区独栋厂房_长信科技产业园官方网站 | 篮球架_乒乓球台_足球门_校园_竞技体育器材_厂家_价格-沧州浩然体育器材有限公司 | 礼堂椅厂家|佛山市艺典家具有限公司 | 酒吧霸屏软件_酒吧霸屏系统,酒吧微上墙,夜场霸屏软件,酒吧点歌软件,酒吧互动游戏,酒吧大屏幕软件系统下载 | 数码听觉统合训练系统-儿童感觉-早期言语评估与训练系统-北京鑫泰盛世科技发展有限公司 | 好笔杆子网 - 公文写作学习交流分享平台 | 地磅-电子地磅维修-电子吊秤-汽车衡-无人值守系统-公路治超-鹰牌衡器 | 国际船舶网 - 船厂、船舶、造船、船舶设备、航运及海洋工程等相关行业综合信息平台 | 等离子空气净化器_医用空气消毒机_空气净化消毒机_中央家用新风系统厂家_利安达官网 | 利浦顿蒸汽发生器厂家-电蒸汽发生器/燃气蒸汽发生器_湖北利浦顿热能科技有限公司官网 |