gluon/package/gluon-config-mode-geo-location-osm/luasrc/usr/lib/lua/gluon/config-mode/geo-location-osm.lua
Matthias Schiffer 1fc71a73b3
gluon-config-mode-geo-location-osm, gluon-web-osm: add support for custom tile layers (#2072)
Allow replacing the default OSM layer with a custom XYZ layer in
site.conf.
2020-07-05 17:06:59 +02:00

29 lines
600 B
Lua

local osm = require 'gluon.web.model.osm'
local site = require 'gluon.site'
local M = {}
M.MapValue = osm.MapValue
function M.help(i18n)
local pkg_i18n = i18n 'gluon-config-mode-geo-location-osm'
return pkg_i18n.translate(
'You may also select the position on the map displayed below '
.. 'if your computer is connected to the internet at the moment.'
)
end
function M.options()
local config = site.config_mode.geo_location.osm
return {
openlayers_url = config.openlayers_url(),
tile_layer = config.tile_layer(),
zoom = config.zoom(12),
pos = config.center(),
}
end
return M