-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_multi_map.py
42 lines (40 loc) · 1.07 KB
/
run_multi_map.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os, sys
from multi_map import LightAPI
if __name__ == "__main__":
db_host = sys.argv[1]
mapscript_path = "{}/GIS/mapserver/debug/all_maps/fs".format(os.environ["HOME"])
mapnik_path = "{}/GIS/mapserver/debug/all_maps/mapnik".format(os.environ["HOME"])
srcs = [
{
"type": "fs",
"path": mapnik_path,
"enable": True,
},
{
"type": "fs",
"path": mapscript_path,
"enable": True,
},
{
"type": "pgsql",
"connect": {
"host": db_host,
"dbname": "maps",
"user": "gis",
"password": "gis",
},
"query": """
select name as map_name,
cont as map_cont
from maps
""",
"enable": True,
}
]
web = LightAPI(srcs=srcs)
#web.serial_src += srcs
web.multi = True
web.debug = 2
#web.log = "{}/out.log".format(maps_path)
#web.full_serializer()
web()