title: Uncaught ReferenceError: latLng is not defined
body: <p>I my google map,i am trying to show the latitude and longitude of the marker position.I am getting the following error <code>"Uncaught ReferenceError: latLng is not defined "</code>.What should i include here.</p>
  
  <p>my codes are as follows</p>
  
  <p>js:</p>
  
  <pre><code>var map;
  function initialize() {
      var mapOptions = {
          center: new google.maps.LatLng(-29.3456, 151.4346),
          zoom: 2,
          scrollwheel: false,
          disableDefaultUI: false,
          mapTypeId: google.maps.MapTypeId.ROADMAP
      };
      map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
  }
  
  function addMarker() {
      marker = new google.maps.Marker({
          position: new google.maps.LatLng(-29.3456, 151.4346),
          map: map,
          draggable: true
      });
  }
  //show the marker position
  
  function updateMarkerPosition(latLng) {
      document.getElementById('info').innerHTML = [
          latLng.lat(),
          latLng.lng()
      ].join(', ');
  }
  updateMarkerPosition(latLng);
  geocodePosition(latLng);
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>&lt;div id="info"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Thanks</p>