From b9bedb8265fb84551ffed8b4030cd95114dffcd7 Mon Sep 17 00:00:00 2001 From: Jan-Tarek Butt Date: Wed, 13 Sep 2017 16:45:27 +0200 Subject: [PATCH] 0400-geo-location.lua: show last selected pos on map if router get reconfigured --- .../src/0400-geo-location.lua.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/gluon-config-mode-geo-location/src/0400-geo-location.lua.in b/package/gluon-config-mode-geo-location/src/0400-geo-location.lua.in index 7bf6526f..76c5d703 100644 --- a/package/gluon-config-mode-geo-location/src/0400-geo-location.lua.in +++ b/package/gluon-config-mode-geo-location/src/0400-geo-location.lua.in @@ -8,22 +8,22 @@ return function(form, uci) #ifdef WITHMAP local function show_lon() + if uci_longitude ~= nil then + return uci_longitude + end if site.config_mode.geo_location.map_lon(false) then return site.config_mode.geo_location.map_lon() end - if uci_longitude ~= nil then - return uci_longitude - end return 0.0 end local function show_lat() + if uci_latitude ~= nil then + return uci_latitude + end if site.config_mode.geo_location.map_lat(false) then return site.config_mode.geo_location.map_lat() end - if uci_latitude ~= nil then - return uci_latitude - end return 0.0 end