title: Stop execution of the getCurrentPosition method
body: <p>I'm using the getCurrentPosition method in Javascript. I would like to implement a button that stops the execution of the method "getCurrentPosition" when it's clicked. I tried with throw/try/catch blocks but it doesn't seem to work :</p>
  
  <pre>
  
      try {
          $('#cancel').on("click", function() { 
              $.mobile.loading('hide'); 
              throw "stop";
          });
          navigator.geolocation.getCurrentPosition(foundLocation, noLocation, {enableHighAccuracy: true, timeout : 30000 }); 
      }
      catch ( er ) { alert(er); return false; }
  
  </pre>
  
  <p>Any ideas? Is it even possible in JS ?
  I had an idea but I don't know if it's possible to trigger a timeout with a JS method so that the getCurrentPosition breaks ?</p>