title: How can I hide markers and markerclusters outside a specific zoom level in folium?
body: <p>Is it possible to hide a marker and markercluster on folium map in some specific zoom level?</p>
  
  <p>My code needs to react to zoom change and decide what points I want to share and register/deregister them from the map.</p>
  
  <p>I know that it is possible to do it with Leaflet using get.Zoom() and zoomend. As folium uses map from Leaflet I guess that is also possible to do it with folium, but I am not sure how to do it yet. </p>
  
  <p>This is what I have so far (any idea on how to improve my code and make it "smarter" is also appreciated, I am just a beginner in Python):</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import matplotlib as mpl
  import numpy as np
  import pandas as pd
  import seaborn
  import folium
  import mplleaflet
  import os
  import json
  from folium import plugins
  from folium.plugins import MarkerCluster
  from folium import FeatureGroup, LayerControl, Map, Marker
  
  df = pd.read_csv(r'Pakistan.csv')
  data = df[['Latitude', 'Longitude']].values.tolist()
  
  x = list(df['Latitude'])
  y = list(df['Longitude'])
  ID = list(df['S'])
  
  latmean = df['Latitude'].mean()
  lonmean = df['Longitude'].mean()
  
  m = folium.Map(location=[latmean, lonmean], zoom_start= 10, zoom_control=True)
  folium.TileLayer('openstreetmap').add_to(m)
  folium.TileLayer('Stamen Terrain').add_to(m)
  
  #Vega data
  vis1 = os.path.join('data', 'vis1.json')
  
  #Geojson Data
  overlay = os.path.join('data', 'overlay.json')
  
  #Distrital
  fgDistrital = FeatureGroup(name='Distrital', control=True)
  my_Circle1 = MarkerCluster().add_to(fgDistrital)
  for i in range (1,4):
   folium.Marker(location=[x[i], y[i]], popup=str("Distrital")).add_to(my_Circle1)
  
  #Polo
  fgPolo = FeatureGroup(name = 'Polo', show=False)
  my_Circle2 = MarkerCluster().add_to(fgPolo)
  for i in range (5,8):
   folium.Marker(location=[x[i], y[i]], popup=folium.Popup(str("Polo"), max_width=450, show=True).add_child(folium.Vega(json.load(open(vis1)), width=450, height=250))).add_to(my_Circle2)
  
  #Rota
  fgRota = FeatureGroup(name='Rota', control=True)    
  my_Circle3 = MarkerCluster().add_to(fgRota)
  for i in range (9,20):
   folium.Marker(location=[x[i], y[i]], popup=str("Rota")).add_to(my_Circle3)
  
  m.add_child(fgDistrital)
  m.add_child(fgPolo)
  m.add_child(fgRota)
  folium.GeoJson(overlay, name = 'vis1').add_to(m)
  folium.LayerControl(collapsed=True).add_to(m)
  m.save('example.html')
  </code></pre>