Of course, I make code for marker add and move, but how do I can make deletion option for marker? And how do I can make automatic route creator from marked point A to marked point B? Anyone know?

var riga = new google.maps.LatLng(56.878999, 24.455566);

  var neighborhoods = [
    new google.maps.LatLng(56.946250, 24.104494)
  ];

  var markers = [];
  var markersArray = [];
  var map;

  function initialize() {
    var mapOptions = {
      	zoom: 7,
      	mapTypeId: google.maps.MapTypeId.HYBRID,
      	center: riga
    };

  map =  new google.maps.Map(document.getElementById("map_canvas"), mapOptions);

  google.maps.event.addListener(map, 'click', function(event) {
    addMarker(event.latLng);
  });
}
  
function addMarker(location) {
  marker = new google.maps.Marker({
    position: location,
    map: map,
	draggable: true,
    animation: google.maps.Animation.DROP
  });
  markersArray.push(marker);
}

Mcwebalizer,

marker.setMap(null);

marker still exists in javascript but is no loner displayed.

To redisplay marker on myMap :

marker.setMap(myMap);

Airshow