title: Leaflet: how to select the markers from drop down menu on different layers with clustering
body: <p>I have many markers on several layers. Markers are located in a quite small area. That's why I'm using MarkerCluster plugin</p>
  
  <pre><code>var markerClusterLayer = L.markerClusterGroup();
  </code></pre>
  
  <p>I have to be able to switch between layers and be able to select a particular marker from drop down list. It's a part of my code to realize it:</p>
  
  <pre><code>var selector = L.control({
    position: 'topleft'
  });
  
  selector.onAdd = function(map) {
    var div = L.DomUtil.create('div', 'mySelector');
    div.innerHTML = '&lt;select id = "marker_select"&gt;&lt;option value = "init"&gt;(деревни)&lt;/option&gt;&lt;/select&gt;';
    return div;
  };
  
  selector.addTo(map);
  
  var marker_select = L.DomUtil.get("marker_select");
  
  var allMarkers = L.layerGroup();
  
  function fillSelect (layer) {
      var optionElement = document.createElement("option");
    optionElement.innerHTML = layer.feature.properties.name;
    optionElement.value = L.stamp(layer);
    marker_select.appendChild(optionElement);
    allMarkers.addLayer(layer);
  }
  
  firstMarkerLayer.eachLayer(fillSelect);
  
  map.on ('overlayadd', function (eventLayer) {
      var selectedLayer = eventLayer.layer;
      marker_select.innerHTML = '&lt;option value = "init"&gt;(деревни)&lt;/option&gt;';
      selectedLayer.eachLayer(fillSelect);
  });
  
  L.DomEvent.addListener(marker_select, 'click', function(e) {
    L.DomEvent.stopPropagation(e);
  });
  
  L.DomEvent.addListener(marker_select, 'change', changeHandler);
  
  function changeHandler (e) {
      if (e.target.value == "init") {
          map.closePopup();
      } else {
          var selected = allMarkers.getLayer(e.target.value);
          if (map.hasLayer(selected)) {
              markerClusterLayer.zoomToShowLayer(selected, function() {
                  selected.openPopup();
              })
          }
      }
  };
  
  markerClusterLayer.addLayer(allMarkers);
  
  map.addLayer(markerClusterLayer);
  </code></pre>
  
  <p>Unfortunately, the code works incorrect. The markers added to the map twice. First time in the clusters, second time separately. And I can't find the point where it happens. Also I have to switch between groups of base layers and overlays. I.e. I need only two buttons "first" and "second" instead of radio buttons for the base layers and check boxes for the overlays.</p>
  
  <p>Selection for one layer with MarkerCluster plugin works well. Here it is:
  <a href="http://jsfiddle.net/anton9ov/atd1pr23/" rel="nofollow">http://jsfiddle.net/anton9ov/atd1pr23/</a></p>
  
  <p>But I can't organize a selection from different layers with clustering... Here the full broken code:
  <a href="http://jsfiddle.net/anton9ov/pgpLg5zw/" rel="nofollow">http://jsfiddle.net/anton9ov/pgpLg5zw/</a></p>
  
  <p>Can anybody tell me, what I'm doing wrong?</p>