Skip to content
JavaScript CSS
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Update LICENSE Aug 23, 2013 Update Dec 13, 2013
icon-viewcenter.png Add plugin source Aug 23, 2013
leaflet.viewcenter.css Update leaflet.viewcenter.css Aug 28, 2013
leaflet.viewcenter.js Add plugin source Aug 23, 2013



This is a simple extension of Leaflet.Control.Zoom that adds a change localization and zoom button above the zoom in and zoom out controls.

Checkout the demo.


Be sure to include the leaflet.viewcenter.js script somewhere after Leaflet is loaded.

<script src=""></script>

<link rel="stylesheet" href="leaflet.viecenter.css" />
<script src="leaflet.viewcenter.js"></script>

Do all your normal Leaflet initialization stuff, except make sure that you initialize the map without the default zoom controls:

<!-- map container -->
<div id="map"></div>

// init map
var map = new L.Map('map');

// init ViewCenter plugin
var viewCenter = new L.Control.ViewCenter();


This extension was built and tested for Leaflet version 0.6.4.

Bitdeli Badge

You can’t perform that action at this time.