title: How to move marker on the map dynamically on click of the button
body: <p>I am adding Marker dynamically and adding click event to every marker added on the map. This is the way, I am adding the marker on the map.</p>
  
  <pre><code>var pin = new google.maps.LatLng(Y, X);
  var marker = new google.maps.Marker({ position: pin, map: map1 });
  google.maps.event.addListener(marker, 'click', pinClicked);
  marker.setMap(map1);
  </code></pre>
  
  <p>In the click event, based on certain conditions I am displaying a popup with certain details and buttons. One button is to close the popup and the other button is to Move marker.
  What I want is when I click the Move marker button, I want the marker to be moved. 
  I don't want to set the draggable property to true by default, as it will be allowing the marker to be dragged when added on the map.
  Marker should be draggable only when the button on the popup is clicked.</p>
  
  <p>How can I get this working. </p>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks.</p>