获取街景小人放下时的坐标。
Get the coordinates when the Pegman is dropped.
如何获取街景小人掉落位置的坐标?在 Whosebug 和 Google API 中找不到任何有用的文章。是否有任何事件可以在街景小人掉落时捕获?
对于地图,尝试在点击事件上使用侦听器
google.maps.event.addListener(map, 'click', function(event){
alert(event.latLng );
});
街景看这个googlesample
(下面你会看到这个概念,但对于完整的示例更好)
google.maps.event.addListener(panorama, 'position_changed', function() {
alert(panorama.getPosition()) ;
});
如何获取街景小人掉落位置的坐标?在 Whosebug 和 Google API 中找不到任何有用的文章。是否有任何事件可以在街景小人掉落时捕获?
对于地图,尝试在点击事件上使用侦听器
google.maps.event.addListener(map, 'click', function(event){
alert(event.latLng );
});
街景看这个googlesample (下面你会看到这个概念,但对于完整的示例更好)
google.maps.event.addListener(panorama, 'position_changed', function() {
alert(panorama.getPosition()) ;
});