2012-05-11 41 views

回答

3

這兩者都是非常簡單 - 你只需聽正確的事件:

地圖類型已變更:

google.maps.event.addListener(map, 'maptypeid_changed', function() { 
    console.log("map type changed"); 
}); 

Streetview Activated:

var pano = map.getStreetView(); 
google.maps.event.addListener(pano, 'visible_changed', function() { 
    if (pano.getVisible()) { 
    console.log("street view visible"); 
    } 
});