2017-08-31 11 views
-1

GoogleストリートビューAPIの画像を使用するアプリを構築しています。私は画像を拡大する必要があります。GoogleストリートビューJS - FoV&FoVイベント

私はイベントpov_changedを使用していますが、私はPOVピッチと見出しの変化を追跡します。最終画像のズームを決定するには、FoV(Field of View)アトリビュートが必要です。私はこのようなセットアップを持って

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 
    } 
    }) 

私はのようないくつかのものを持ってフォームを更新するための値を取得する取得するには...しかし、私は取得する方法を見つけることができませんField of View属性。私は視野が画像にズームインするには、上記のように、リンクで使用するために見つけることができますどのように

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 

+0

ます。https:/ /stackoverflow.com/questions/9794436/how-can-i-determine-the-field-of-view-a-street-view-panorama-map-is-using –

+0

@ anatoly.sukhanov:FOVを取得する方法質問、私はFOVを見つける必要がある –

答えて

関連する問題