Skip to content

Instantly share code, notes, and snippets.

@christianhent
Last active December 16, 2017 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianhent/40ce1db34b22d27f1f5de53646ee122c to your computer and use it in GitHub Desktop.
Save christianhent/40ce1db34b22d27f1f5de53646ee122c to your computer and use it in GitHub Desktop.
creates the zoomhome-control and add it to the map
<script>
// ... existing map code
// ...
map.fitBounds(geoJson.getBounds());
// create the zoomhome-control and add it to the map
var zoomHome = L.Control.zoomHome();
zoomHome.addTo(map);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment