title: using coordinate variables
body: <p>I have some problems with the javascript for my user coordinates. In all examples they print an alert message on the return callback from geolocation, but I want to use the lat,long coordinates for printing or setting other values. What is the problem with this code? Can anyone be kind and explain: :)</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  navigator.geolocation.getCurrentPosition(success);
  
  function success(position) {
   var lat = position.coords.latitude;
   var long = position.coords.longitude;
  }
  
  document.write(lat);
  &lt;/script&gt;
  </code></pre>
  
  <p>and this is the errorcode with phonegap:</p>
  
  <blockquote>
    <p>05-12 16:40:35.486: E/Web Console(15962): ReferenceError: Can't find
    variable: lat at file:///android_asset/www/showMap/showMap.html:31</p>
  </blockquote>
  
  <p>Thanks</p>