title: distance between two points google maps a is undefined api v3
body: <p>Updating to v3. 
  Library is declared like this: </p>
  
  <pre><code>&lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&amp;v=3&amp;libraries=geometry"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Finding distance like this:</p>
  
  <pre><code>var loc1 = google.maps.LatLng(52.5773139, 1.3712427);
  var loc2 = google.maps.LatLng(52.4788314, 1.7577444);
  alert(google.maps.geometry.spherical.computeDistanceBetween (loc1, loc2));
  </code></pre>
  
  <p>Firebug returns this:</p>
  
  <pre><code>TypeError: a is undefined
  </code></pre>
  
  <p>Assuming it's an error because lat and lon need to be passed as objects, so after some googling I tried this:</p>
  
  <pre><code>var loc1 = google.maps.LatLng({'position' :52.5773139, 1.3712427});
  var loc2 = google.maps.LatLng({'position' :52.4788314, 1.7577444});
  </code></pre>
  
  <p>Still get same error, what am I doing wrong?</p>