/* leaflet.zoomhome 0.2.0 CC-BY-SA-3.0 http://www.github.com/torfuspolymorphus/leaflet.zoomhome Torf (http://www.torf.cc) toms (https://gis.stackexchange.com/users/9847/toms) */ !function(){"use strict";L.Control.ZoomHome=L.Control.Zoom.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out",zoomHomeIcon:"home",zoomHomeTitle:"Home",homeCoordinates:null,homeZoom:null},onAdd:function(a){var b="leaflet-control-zoomhome",c=L.DomUtil.create("div",b+" leaflet-bar"),d=this.options;null===d.homeCoordinates&&(d.homeCoordinates=a.getCenter()),null===d.homeZoom&&(d.homeZoom=a.getZoom()),this._zoomInButton=this._createButton(d.zoomInText,d.zoomInTitle,b+"-in",c,this._zoomIn.bind(this));var e='';return this._zoomHomeButton=this._createButton(e,d.zoomHomeTitle,b+"-home",c,this._zoomHome.bind(this)),this._zoomOutButton=this._createButton(d.zoomOutText,d.zoomOutTitle,b+"-out",c,this._zoomOut.bind(this)),this._updateDisabled(),a.on("zoomend zoomlevelschange",this._updateDisabled,this),c},_zoomHome:function(a){this._map.setView(this.options.homeCoordinates,this.options.homeZoom)}}),L.Control.zoomHome=function(a){return new L.Control.ZoomHome(a)}}();