I set the map center in the initialize function, but when the page
loads, the center coordinates end up at the top left corner of the
map.
Any help is appreciated.
code:
-------------------------------
var map;
var geoXml;
var toggleState = 1;
var marker = null;
function initialize() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"));
map.setUIToDefault();
map.setCenter(new GLatLng(36.778928, -119.676516), 13);
map.setMapType(G_NORMAL_MAP);
marker = new GMarker(new GLatLng(36.778928, -119.676516),
{draggable: false});
map.addOverlay(marker);
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.