title: Google maps API v3 - Marker disappears after setPosition
body: <p>I'm having a problem with the maps markers. The map and marker load fine on the inital pageload. But when I try to update the marker location it simply disappears. The Alert window gives the correct coördinates. What am I doing wrong here?</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;script&gt;
  var myCenter=new google.maps.LatLng(&lt;?php echo $loc; ?&gt;);
  
  function initialize()
  {
    var mapProp = {
    center:new google.maps.LatLng(&lt;?php echo $loc; ?&gt;),
    zoom:15,    
    mapTypeId:google.maps.MapTypeId.ROADMAP,
    };
  var map=new google.maps.Map(document.getElementById("googleMap")
  ,mapProp);
  var marker=new google.maps.Marker({
  position:myCenter,
  });
  
  marker.setMap(map);                 
  
  setInterval(function(){ 
      jQuery.get('loc.php?v=&lt;?php echo $_GET['voertuignummer'];?&gt;', function(data) {
  alert(data);
  position = new google.maps.LatLng(data);
  marker.setPosition(position);
  map.setCenter(position);
      });
  
  }, 15000);
  
  }
  
  google.maps.event.addDomListener(window, 'load', initialize);
  &lt;/script&gt;
  </code></pre>