gluon/package/gluon-config-mode-geo-location-osm/check_site.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

11 lines
685 B
Lua

need_number(in_site({'config_mode', 'geo_location', 'osm', 'center', 'lon'}))
need_number(in_site({'config_mode', 'geo_location', 'osm', 'center', 'lat'}))
need_number(in_site({'config_mode', 'geo_location', 'osm', 'zoom'}), false)
need_string(in_site({'config_mode', 'geo_location', 'osm', 'openlayers_url'}), false)
if need_table(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer'}), nil, false) then
need_one_of(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'type'}), {'XYZ'})
need_string(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'url'}))
need_string(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'attributions'}))
end