2010-10-01 6 views

risposta

33

Si aspetta un elemento DOM, ma $('#map_container') restituisce un oggetto jQuery. Se si desidera utilizzare un selettore jQuery, fare:

var map = new google.maps.Map($('#map_container')[0], myOptions); 

Oppure si può anche utilizzare .get(0) invece di [0], questo restituisce l'oggetto DOM reale.

+0

Nice workaround, there =) –

+0

Grazie =), funziona! –

+0

FANTASTICO! Che bella soluzione – xeonarno