title: Geolocation: moving only google maps marker without reload the map
body: <p>I need to update only the marker when the device is moving or when the device is getting more accuracy. When the position change also reload the map and I need to move only the maker. I have the following code: </p>
  
  <pre><code>if (navigator.geolocation) {
      navigator.geolocation.watchPosition(
  
      function(position){
      var latitude = position.coords.latitude;
      var longitude = position.coords.longitude;
      var accuracy = position.coords.accuracy;
      var coords = new google.maps.LatLng(latitude, longitude);
      var mapOptions = {
          zoom: 20,
          center: coords,
          streetViewControl: false,
          mapTypeControl: false,
          navigationControlOptions: {
              style: google.maps.NavigationControlStyle.SMALL
          },
          mapTypeId: google.maps.MapTypeId.ROADMAP
          };
  
       var capa = document.getElementById("capa");
       capa.innerHTML = "latitud: " + latitude + " longitud: " + "   aquesta es la precisio en metres  :  " + accuracy;  
  
          map = new google.maps.Map(
              document.getElementById("mapContainer"), mapOptions
              );
          var marker = new google.maps.Marker({
                  position: coords,
                  map: map,
                  title: "ok"
          });
  
  
      },function error(msg){alert('Please enable your GPS position future.');  
  
    }, {maximumAge:0, timeout:5000, enableHighAccuracy: false});
  
  }else {
      alert("Geolocation API is not supported in your browser.");
  }
  </code></pre>
  
  <p>Thanks!</p>