Google.maps.Map Javascript API V3与jquery的兼容性

Google.maps.Map Javascript API V3与jquery的兼容性,javascript,jquery,google-maps,google-maps-api-3,maps,Javascript,Jquery,Google Maps,Google Maps Api 3,Maps,我试图通过在id=“google\u map”的div上添加一个map来解释为什么这会起作用 但这行不通 var our_map = $("#google_map"); map = new google.maps.Map(our_map, googleMapOptions); 我在firebug上得到这个控制台错误 TypeError: Argument 1 of Window.getComputedStyle does not implement interface Element.

我试图通过在id=“google\u map”的div上添加一个map来解释为什么这会起作用

但这行不通

var our_map = $("#google_map");
map = new google.maps.Map(our_map, googleMapOptions); 
我在firebug上得到这个控制台错误

TypeError: Argument 1 of Window.getComputedStyle does not implement interface Element.


...(a,b,c){c=c&&1==b;Jt.H?Yn(a[w],c?"":b):(b="alpha(opacity="+Jd(100*b)+")",rn(a[w]...

Map
constructor期望
Node
作为第一个参数:Map(mapDiv:Node,opts?:maptoptions)

而不是

map = new google.maps.Map(our_map, googleMapOptions); 
你必须使用

map = new google.maps.Map(our_map[0], googleMapOptions); 
map = new google.maps.Map(our_map[0], googleMapOptions);