title: how to get current location in phonegap?
body: <p>i  added Geolocation plugin in my app and used this code for getting the current location in phonegap. but this code does not work.</p>
  
  <pre><code>    document.addEventListener("deviceready", onDeviceReady, false);
  
  function onDeviceReady() {
      alert("4");
      navigator.geolocation.getCurrentPosition(onSuccess, onError);
  }
  
  function onSuccess(position) {
      alert("1");
  }
  
  function onError(error) {
      alert("3");
  }
  </code></pre>
  
  <p>Where is the problem in my code?</p>
  
  <p>thank you and sorry for my poor english.</p>