久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <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="qwawimqqmiuu" 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>

        用谷歌街景面對目標(biāo)建筑

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

        <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="qwawimqqmiuu" 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>

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

                  問題描述

                  我的問題很簡單.

                  我需要 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 值,用于查看建筑物的方式.但是可以在街景中使用標(biāo)記來定位您的建筑物!示例

                  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) 函數(shù)計算街景位置和建筑物之間的方向.

                  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.

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

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

                  示例(自由女神像)

                  另一種選擇,使用路線服務(wù):

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

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

                  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>

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

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

                  相關(guān)文檔推薦

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

                    <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="qwawimqqmiuu" 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'>

                            主站蜘蛛池模板: 天天操网| 国产盗摄视频 | 日韩欧美一区在线 | 国产亚洲一区在线 | 日本免费小视频 | 在线播放一区二区三区 | 久久国| 精品在线免费看 | 国产精品久久久久久久久污网站 | 成人在线视频网 | 国产精品免费观看视频 | 欧美日韩在线看 | 天堂成人国产精品一区 | 日本不卡视频 | 黄网站涩免费蜜桃网站 | 91私密视频 | 中文字幕国 | 精品伊人 | 亚洲精品乱码久久久久久久久久 | 色视频www在线播放国产人成 | 欧美电影一区 | 成年人免费看的视频 | 51ⅴ精品国产91久久久久久 | avmans最新导航地址 | 精久久| 午夜影院在线观看视频 | 奇米影视首页 | 欧美久久精品一级黑人c片 91免费在线视频 | 午夜欧美a级理论片915影院 | 在线精品亚洲欧美日韩国产 | 超碰在线人人干 | 国产精品日韩在线 | 日本一区二区三区四区 | 国产精品毛片一区二区在线看 | 中文字幕在线播放第一页 | 免费网站国产 | 国产中文在线观看 | 欧美精品一区二区三区四区 在线 | www.操.com | 国产一区二区三区在线看 | 日韩精品一二三 |