ペグマンのアイコンがGoogleマップにドロップされたときにキャプチャし、パノラマの位置とズームをサーバーに送信しようとしています。以下のコードは、visible_changed イベントをリッスンするためのものです。しかし、thePanorama.getZoom() と getPosition() は未定義を返します。
thePanorama = map.getStreetView();
streetviewChangeListener = google.maps.event.addListener(thePanorama, 'visible_changed', function() {
console.log('visible_changed ');
console.log('streetview panorama position: ' + thePanorama.getPosition() + ' zoom: ' + thePanorama.getZoom());
emitStreetViewEvents({position: thePanorama.getPosition(), zoom: thePanorama.getZoom()});
});
ヘルプ?