title: Error defining geocoder variable while using Google Maps API and Parse Cloud Code
body: <p>I am attempting to use Parse Cloud Code to geocode an address using the Google Maps API v3. Following the suggested code from Google I am using the following:</p>
  
  <pre><code> Parse.Cloud.afterSave ('IncidentDetails', function(request, status) {
  
                     var address = request.object.get("address1");
                     var geocoder;
  
                     function initialize () {
  
                     geocoder = new google.maps.Geocoder();
                     codeAddress (address);
  
                     }
  
                     function codeAddress () {
  
                     geocoder.geocode( { 'address':address}, function (results, status) {
  
                                      if (status == google.maps.GeocoderStatus.OK) {
  
                                          var lat = results[0].geometry.location.lat();
                                          var lng = results[0].geometry.location.lng()
                                          request.object.set("lat", lat);
                                          request.object.set("lng", lng);
  
                                      } else {
  
                                      alert('Geocode was not successful for the following reasons: ' + status);
                                      }
                                      });
                     }
  
                     initialize ();
  
                     });
  </code></pre>
  
  <p>The code runs fine after a PFObject is saved, but fails on </p>
  
  <pre><code>geocoder = new google.maps.Geocoder ();
  </code></pre>
  
  <p>with the error: ReferenceError: google is not defined</p>
  
  <p>I see in HTML where a source is defined and api key set, but I don't see the same for pure java script examples. </p>
  
  <p>Any help on getting the geocoder variable initialized properly would be appreciated. </p>