> printGoogleMap(NULL, 'gmap', 'show', 'mapcallback');
Try the correct parameters ;-) The callback is the 5th paramater ;-)
> Do I need to return the $map object?
No, should not, the callback use does not use any return. That's why it is ipassed by reference in my example reason actually. Again, I never tried this actually. Perhpas try using the class directly, it is not that much more complicated.