title: completely destroy marker on gmap3
body: <p>I am trying to let a user drop up to 10 markers and remove them onClick.  I also have it updating a "div" with the coordinates of the markers on the map when a user adds a marker or drags.  I have everything working except for when the user deletes a marker, it's still seems to be on the map when I loop through the markers.  Any idea what I'm doing wrong?</p>
  
  <p>jsFiddle: <a href="http://jsfiddle.net/ryanverdel/WRyrJ/" rel="nofollow">jsfiddle.net/ryanverdel/WRyrJ/</a></p>
  
  <p>Code:</p>
  
  <pre><code>  $(document).ready(function () {
  
        var markerCount = 0;
  
          $("#test1").gmap3({
              map: {
                  options: {
                      center: [-2.2214281090541204, -78.695068359375],
                      zoom: 8,
                      mapTypeId: google.maps.MapTypeId.ROADMAP,
                      mapTypeControl: true,
                      mapTypeControlOptions: {
                      style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
                      },
                      navigationControl: true,
                      scrollwheel: true,
                      disableDoubleClickZoom: true,
                      streetViewControl: false,
  
                  },
                  events: {
  
  
                      click: function (map, event) {
  
                          if(markerCount &lt; 10){
  
  
                          $(this).gmap3(
  
                             {
                                 marker: {
                                     latLng: event.latLng,
                                     options:{
                                      draggable: true,
                                      animation: google.maps.Animation.DROP,
                                       },
  
  
  
                                      events: {
                                      click: function(marker) {
  
                                       marker.setMap(map);
                                       marker.setMap(null);
                                       marker = null;
                                       delete marker;
                                       console.log(marker); 
  
                                       markerCount--;
                                           },
  
                                      dragend: function(marker) {
                                      $("#inputArray").empty();
  
                             setTimeout(function(){
                             var markers = $("#test1").gmap3({
                               get: {
                               all: true
                               }
                               });
  
                               $.each(markers, function(i, marker){
  
                               $("#inputArray").append('&lt;p&gt;{"latitude":' + marker.position.lat() +', '+ '"longitude":' + marker.position.lng() +'},'+'&lt;/p&gt;');
                               });
                               }, 400);
  
  
  
                                           }
  
  
                                        },
  
  
                                     },
  
  
                                });
  
                             markerCount++;
  
                             $("#inputArray").empty();
  
                             setTimeout(function(){
                             var markers = $("#test1").gmap3({
                               get: {
                               all: true
                               }
                               });
  
                               $.each(markers, function(i, marker){
  
                               $("#inputArray").append('&lt;p&gt;{"latitude":' + marker.position.lat() +', '+ '"longitude":' + marker.position.lng() +'},'+'&lt;/p&gt;');
                               });
                               }, 400);
  
                          }
  
                          else{
                               return false;
                           }; 
  
                      }
                  }
              }
          });
  
       });
  </code></pre>