Google Maps GMap2 not defined?
I'm getting an error 开发者_StackOverflow中文版while using the Google Maps Javascript API:
GMap2 in not defined
The offending line is:
map = new GMap2(document.getElementById("map_canvas"));
Instead of solving the error you shifted to using an API that will be deprecated in May 2013 ? Now you would have to solve this problem again anyways :) Link here
Note: The Google Maps JavaScript API Version 2 has been officially deprecated as of May 19, 2010. The V2 API will continue to work until May 19, 2013. We encourage you to migrate your code to version 3 of the Maps JavaScript API.
I used V3 so that i faced error. Now i'm using v2, the issue is resolved. thanks for all.
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA"
type="text/javascript"></script>
精彩评论