title: How to load Google Maps API with RequireJS?
body: <p>I am struggling to load gmaps api with requireJS . This is what I've tried:</p>
  
  <pre><code>requirejs.config({
      urlArgs: "noCache=" + (new Date).getTime(),
      paths : {
          "jquery": "vendor/jquery-1.8.2.min",
          "bootstrap": "vendor/bootstrap.min",      
          "underscore": "libs/underscore-min",
          "backbone": "libs/backbone-min",    
          "template": "libs/template",
          "gmaps": "http://maps.google.com/maps/api/js?v=3&amp;sensor=false"
      },
      shim: {
          'backbone': {
              deps: ['jquery', 'underscore'],
              exports: 'Backbone'
          },
          'underscore': {
              exports: '_'
          },
          'bootstrap': {
              deps: ['jquery']
          },
          'gmaps': {
              deps: ['jquery']
          },
          'main':{
              deps: ['jquery','gmaps']   
          }
      }
  });
  
  require(["main"], function (main) {})
  </code></pre>
  
  <p>But inside main.js when I try to instantiate the geocoder i got ,,undefined is not a function" error.</p>
  
  <pre><code>var geocoder = new google.maps.Geocoder();
  </code></pre>
  
  <p>Any ideas what could I be doing wrong?</p>