document.getElementById("map")
In this part of the code you put the id of the div where the map will be made, in this example the id of the div is "map". You can replace with the id of your div.
mapOptions
This is an object with the map options that you are going to create, it will pass the object you created earlier in the example
var mapOptions = //Sets map options
{
zoom: 15, //Sets zoom level (0-21)
center: coords, //zoom in on users location
mapTypeControl: true, //allows you to select map type eg. map or satellite
navigationControlOptions:
{
style: google.maps.NavigationControlStyle.SMALL //sets map controls size eg. zoom
},
mapTypeId: google.maps.MapTypeId.ROADMAP //sets type of map Options:ROADMAP, SATELLITE, HYBRID, TERRIAN
};
In this case you are setting the zoom, center and other settings of your map.
Without the comments would just be:
map = new google.maps.Map(document.getElementById("map"), mapOptions);
The example is only commenting on what each information is. You just need to pass the correct div and object with the settings you need.