code: function(dname,note) {
      if (note) { map.closePopup(); }
      if (typeof polygons[dname] != "undefined") {
          layers[polygons[dname].lay].removeLayer(polygons[dname]);
          delete polygons[dname];
      }
      if (typeof polygons[dname+"_"] != "undefined") {
          layers[polygons[dname+"_"].lay].removeLayer(polygons[dname+"_"]);
          delete polygons[dname+"_"];
      }
      if (typeof markers[dname] != "undefined") {
          layers[markers[dname].lay].removeLayer(markers[dname]);
          map.removeLayer(markers[dname]);
          delete markers[dname];
      }
      delete allData[dname];
      if (note) { ws.send(JSON.stringify({action:"delete", name:dname, deleted:true})); }
  }
docs: Delete a marker (and notify websocket)