How do I catch if map type was changed?
Both of these are pretty straightforward - you simply listen to the proper events:
Map Type Changed:
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");
}
});