I can\'t understand what is the problem? I used this example from Google Map APIs: Simple Map
I had the same issue working on a wordpress template with Sage (a WordPress starter theme).
My js was wrapped with
(function($) {
// all the functions to create map, center markers, etc.
}
Then, the map was initialize in $(document).ready
I removed (function($) { } and just add the functions without $(document).ready then it was ok.
Also, be sure to load the custom js file before the api google map :