-1
我正在構建一個應用程序,使用Google街景視圖API中的圖片。我需要放大圖像。Google Street View JS - FoV&FoV Event
我正在使用事件pov_changed
,我跟蹤對POV音高和標題的更改。要決定最終圖像的縮放比例,我需要一個FoV(視野)屬性。
https://maps.googleapis.com/maps/api/streetview?size=700x600&location=40.159172842909,-103.201315097248&heading=22.3118227257402&pitch=-1.42049583899625&key=<key>&fov=20
我有這樣的設置...
center = new google.maps.LatLng(address.latitude, address.longitude)
map = new google.maps.Map(document.getElementById('map'), {
center: center,
zoom: address.zoom
})
street = new google.maps.StreetViewPanorama(document.getElementById('street'), {
position: center,
pov: {
heading: address.pov_heading || 150,
pitch: address.pov_pitch || 0.75
}
})
要獲得獲取值更新形式,我有一些事情一樣......但我無法找到如何獲得視野屬性。
street.addListener 'pov_changed', ->
pitchField.html(street.getPov().pitch)
headingField.html(street.getPov().heading)
# console.log(street.getFov()) # is not a function
# console.log(street.getFoV()) # is not a function
# console.log(street.getFOV()) # is not a function
如何查找要在鏈接中使用的視野以放大圖像。
HTTPS:/ /stackoverflow.com/questions/9794436/how-can-i-determine-the-field-of-view-a-street-view-panorama-map-is-using –
@ anatoly.sukhanov:如何獲得FOV是這個問題,我只需要找到FOV –