0400-geo-location.lua: show last selected pos on map if router get reconfigured

This commit is contained in:
Jan-Tarek Butt 2017-09-13 16:45:27 +02:00
parent 3412cd97b8
commit b9bedb8265

View File

@ -8,22 +8,22 @@ return function(form, uci)
#ifdef WITHMAP #ifdef WITHMAP
local function show_lon() local function show_lon()
if uci_longitude ~= nil then
return uci_longitude
end
if site.config_mode.geo_location.map_lon(false) then if site.config_mode.geo_location.map_lon(false) then
return site.config_mode.geo_location.map_lon() return site.config_mode.geo_location.map_lon()
end end
if uci_longitude ~= nil then
return uci_longitude
end
return 0.0 return 0.0
end end
local function show_lat() local function show_lat()
if uci_latitude ~= nil then
return uci_latitude
end
if site.config_mode.geo_location.map_lat(false) then if site.config_mode.geo_location.map_lat(false) then
return site.config_mode.geo_location.map_lat() return site.config_mode.geo_location.map_lat()
end end
if uci_latitude ~= nil then
return uci_latitude
end
return 0.0 return 0.0
end end