2
votes

i am starting with google maps. just learning. awhile ago, it was working. now its not. everything seems to workin UI Controls, Markers/Overlay but the map is blank.

google.load("jquery", "1.3.2");
google.load("maps", "2");
google.setOnLoadCallback(function() {
    var map = new google.maps.Map2(document.getElementById("map"));
    map.setCenter(new google.maps.LatLng(103.8, 1.37), 13);
    map.setUIToDefault();
    map.addOverlay(new google.maps.Marker(new google.maps.LatLng(103.8, 1.37)));
});

http://i.stack.imgur.com/daAiL.png

1
Zoom out and you'll see the mapChris B

1 Answers

3
votes

The point you are trying to centre the map onto isn't a valid Lat/Lon pair: Latitude runs from +/-90 degrees: you're passing in +103.8

seems like you've got your parameters the wrong way around (Lat +1.37, Lon +103.8 puts you in Malaysia)