title: HTML5 geolocation: toggle watchPosition without re-prompting the user?
body: <p>My HTML5 app uses Google Maps and tracks the user with navigator.geolocation.watchPosition, showing their location with a marker on the map.  </p>
  
  <p>I also have a toggle button. If the user clicks Off, I would like to stop tracking them with watchPosition. </p>
  
  <p>This is my code so far:</p>
  
  <pre><code>    $("#loc-label").click(function(){
          if ($('#loc').is(':checked')) {
              navigator.geolocation.clearWatch(watchId);
              position_marker = null;
          } else {
              watchId = navigator.geolocation.watchPosition(geolocationWorked, geolocationFailed, {enableHighAccuracy:true, maximumAge:30000, timeout:27000});      
          }
      });
  </code></pre>
  
  <p>However, with this code, whenever the user toggles location on, they get re-prompted by the browser (in Firefox at least) asking them if they are willing to share their location.</p>
  
  <p>Is there any way around this? Ideally I'd only like to prompt them once. </p>
  
  <p>Obviously I could just hide the marker (but really continue to track their location) when the user toggles off. However, this isn't ideal, as I'm using high accuracy (i.e. GPS if available) and I'd prefer to give the user the ability genuinely to turn geolocation off. </p>
  
  <p>Thanks!</p>