I am trying to figure out why this will work by adding a map on a div of id="google_map"
map = new google.maps.Map(document.getElementById("google_map"), googleMapOptions);
but this wont work
var our_map = $("#google_map");
map = new google.maps.Map(our_map, googleMapOptions);
I get this console error on 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 expect Node as the first parameter: Map(mapDiv:Node, opts?:MapOptions).
Instead of
map = new google.maps.Map(our_map, googleMapOptions);
you have to use
map = new google.maps.Map(our_map[0], googleMapOptions);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With