title: Move google maps marker when button is clicked
body: <p>I spent a lot of time to solve this, and can't figure it how to work, so here is my base:</p>
  
  <pre><code>&lt;script&gt;
   function initialize() {
          var mapOptions = {
            center: new google.maps.LatLng("43.2697,26.9165"),
            zoom: 8  };
          var map = new google.maps.Map(document.getElementById("map_canvas"),mapOptions);
          var marker=new google.maps.LatLng("43.2697,26.9165");
          var main=new google.maps.Marker({position:marker});
          main.setMap(map); 
        }  
  
  
          function moveMarker(lat,lng) {
             var latlng = new google.maps.LatLng(parseFloat(lat), parseFloat(lng)); 
          //???????
              }
  
  
      google.maps.event.addDomListener(window, 'load', initialize);
  &lt;/script&gt;
  </code></pre>
  
  <p>Now - in HTML i have a button and two text fields. When button is clicked, it fire moveMarker function and pass new latitude and longitude - entered in fields. The goal is that marker must move to new position, and map must be centered - accordingly. I've tryed a lot of hints, but - cant access marker object(with name Main in my case) in order to move it to new position.</p>