title: How to move a marker in Google Maps API
body: <p>I'm using the Google Maps API V3 and I'm trying to make a marker move across the screen. Here's what I have:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no" /&gt;
  &lt;style type="text/css"&gt;
    html { height: 100% }
    body { height: 100%; margin: 0; padding: 0 }
    #map_canvas { height: 100% }
  &lt;/style&gt;
  &lt;script type="text/javascript"
      src="http://maps.googleapis.com/maps/api/js?sensor=false"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  function initialize() {
    var myLatLng = new google.maps.LatLng(50,50);
    var myOptions = {
      zoom: 4,
      center: myLatLng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  
    image = 'bus.gif';
    marker = new google.maps.Marker({position: myLatLng, map: map, icon: image});
  
    marker.setMap(map);
  }
  
  function moveBus()
  {
    // Move Bus
  }
  
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body onload="initialize()"&gt;
  &lt;script type="text/javascript"&gt;
  moveBus();
  &lt;/script&gt;
  &lt;div id="map_canvas" style="height: 500px; width: 500px;"&gt;&lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now what I've tried is replacing // Move Bus with</p>
  
  <pre><code>marker.setPosition(new google.maps.LatLng(0,0));
  </code></pre>
  
  <p>But that didn't do anything. That's the command I saw on the API reference. I'm also relatively new to Javascript, so it might be a JS error on my part.</p>