From 79c2cec956ae6b2b5a89a7308ffaa9ac23e4c0ab Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Mon, 4 Jun 2018 00:05:05 +0200 Subject: [PATCH] Integrated reset_zoom as a map button. --- assets/main.coffee | 5 ----- assets/ownmap.coffee | 5 +++++ templates/index.mustache | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/assets/main.coffee b/assets/main.coffee index b67de59..82b9c19 100644 --- a/assets/main.coffee +++ b/assets/main.coffee @@ -157,11 +157,6 @@ window.initUI = -> # setup history popupstate event handler window.onpopstate = window.handlePopState -window.resetZoom = -> - console.log 'resetZoom' - window.mymap.resetZoom() - return false - window.setLiveMap = -> console.log 'setLiveMap' if window.mymap.toggleLiveView() diff --git a/assets/ownmap.coffee b/assets/ownmap.coffee index fdb37d0..1f76032 100644 --- a/assets/ownmap.coffee +++ b/assets/ownmap.coffee @@ -59,6 +59,11 @@ class window.OwnMap L.control.layers(layers, overlays).addTo @mymap + L.easyButton 'fa-map', (btn, map) => + @resetZoom() + , 'Reset Zoom' + .addTo @mymap + btn_showhide = L.easyButton states: [{ stateName: 'show-markers' diff --git a/templates/index.mustache b/templates/index.mustache index f4c39a6..0ef4d76 100644 --- a/templates/index.mustache +++ b/templates/index.mustache @@ -37,10 +37,6 @@ Config - - Reset view - - Today