From fd81a290b2eb058abf47c2d1a97710facfa8aa0e Mon Sep 17 00:00:00 2001 From: Abhinav Raut Date: Mon, 3 Oct 2022 16:38:28 +0530 Subject: [PATCH] fix: geolocation (#18250) - set center and zoom for leaflet. Co-authored-by: Abhinav Raut --- frappe/public/js/frappe/form/controls/geolocation.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frappe/public/js/frappe/form/controls/geolocation.js b/frappe/public/js/frappe/form/controls/geolocation.js index c78ce52ab6..d99c1bddf5 100644 --- a/frappe/public/js/frappe/form/controls/geolocation.js +++ b/frappe/public/js/frappe/form/controls/geolocation.js @@ -38,6 +38,7 @@ frappe.ui.form.ControlGeolocation = class ControlGeolocation extends frappe.ui.f this.bind_leaflet_draw_control(); this.bind_leaflet_locate_control(); this.bind_leaflet_refresh_button(); + this.map.setView(frappe.utils.map_defaults.center, frappe.utils.map_defaults.zoom); } format_for_input(value) {