Code with API V3.
function initialize () { if (GBrowserIsCompatible()) { var ch = new GLatLng (0,0); var myOptions = { zoom:7, center: ch, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map"), myOptions); directionsDisplay = new google.maps.DirectionsRenderer(map, document.getElementById("map")); directionsDisplay.setMap(map); } }
Code with API V2.
function initialize () { if (GBrowserIsCompatible()) { map = new GMap2 (document.getElementById("map")); map.setCenter (new GLatLng(0,0),1 ); } }
The API V2 code worked flawlessly, the API V3 code is NOt, which displays any map. What is the point of what I am missing?
EDIT V3 code has been changed as follows, but there are no cards yet:
var chicago = new google.maps.LatLng (0, 0); var myOptions = { zoom:1, center: chicago, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map"), myOptions);
source share