This is likely that your <div>
has an empty size (or not displayed) when the new GMap
is called. The map is not aware of the <div>
container resizing by default. You have to manually trigger a resize
event when you display it on the screen with :
event.trigger(map, 'resize', []);