0

http://pastebin.com/hGGGUL3a

Is there any idea why this code doesn't show the marker? Reason i have the marker code in a separate function is due to future changes where the button will obtain new data from a database thus update.

Many Thanks in Advance!

4

1 回答 1

1

好吧,它根本不起作用,不显示地图。原因是第 23 行:

        });

到达那里后,该行:

            marker = new google.maps.Marker({position: google.maps.LatLng(52.907135, -1.093140),
            map: map
        });

应该:

            marker = new google.maps.Marker({position: new google.maps.LatLng(52.907135, -1.093140),
            map: map
        });
于 2012-05-01T13:34:46.433 回答