Skip to content

Instantly share code, notes, and snippets.

@patrickarlt
Created January 27, 2014 17:04
Show Gist options
  • Save patrickarlt/8652677 to your computer and use it in GitHub Desktop.
Save patrickarlt/8652677 to your computer and use it in GitHub Desktop.
map.on("zoomend", function(e){
//Event docs: http://leafletjs.com/reference.html#event/
var themap = e.target;
// get the zoom of the map noww that we are zoomed out http://leafletjs.com/reference.html#map-getzoom
if(themap.getZoom() > 10){
// zoomed in more then 10
} else {
// zoomed out above 10
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment