Now we'll add just two more lines to the JavaScript to add the "Map Type" control. NOTE: We also changed the line from the previous map that specified a small map control to use a large 3D one, so you can get a feeling for that.
JavaScript Code for the Map Type Control
Just add the line highlighted in red to your map options, and give it a try.
var MapOptions = {
zoom: 11,
center: latlng,
mapTypeControl: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
The Resulting Map
Do you see the control in the upper right of the map? The two types of maps are at your disposal now, and if you hold the mouse pointer over the map label, you will be shown a third type, namely Terrain. Give it a try.
