config.json.j2 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {
  2. "dataPath": "/data/",
  3. "siteName": "{{freifunk.name}}",
  4. "mapSigmaScale": {{ mapconfig.globalMap.map_scale }},
  5. "showContact": {{ mapconfig.globalMap.map_show_contact | lower}},
  6. "maxAge": {{ mapconfig.globalMap.map_max_age }},
  7. {% if "max_goto_zoom" in mapconfig.globalMap %}
  8. "maxGotoZoom": {{ mapconfig.globalMap.max_goto_zoom }},
  9. {% endif %}
  10. "mapLayers": [
  11. {% for layer in mapconfig.layers %}
  12. {
  13. "name": "{{layer.name}}",
  14. "url": "{{layer.url}}",
  15. "config": {
  16. {% for k,v in layer.config|dictsort %}
  17. "{{k}}": {% if v is number %}{{v}}{% else %}"{{v}}"{% endif %}{% if not loop.last %},{% endif %}
  18. {% endfor %}
  19. }
  20. }{% if not loop.last %},{% endif %}
  21. {% endfor %}
  22. ],
  23. "siteNames": [
  24. {% for domaene in domaenen|dictsort %}
  25. { "site": "{{freifunk.kurzname}}d{{domaene[0]}}", "name": "Domäne {{domaene[0]}} - {{domaene[1].name}}" }{% if not loop.last %},{% endif %}
  26. {% endfor %}
  27. ],
  28. {% if mapconfig.globalInfos is defined %}
  29. "globalInfos": [
  30. {% for globalInfo in mapconfig.globalInfos %}
  31. { "name": "{{ globalInfo.name }}",
  32. "iframe": "{{ globalInfo.iframe }}"{% if globalInfo.caption is defined %},
  33. "caption": "{{ globalInfo.caption }}"{% endif %}
  34. }{% if not loop.last %},{% endif %}
  35. {% endfor %}
  36. ],
  37. {% endif %}
  38. {% if mapconfig.nodeInfos is defined %}
  39. "nodeInfos": [
  40. {% for nodeInfo in mapconfig.nodeInfos %}
  41. { "name": "{{ nodeInfo.name }}",
  42. "iframe": "{{ nodeInfo.iframe }}"{% if nodeInfo.caption is defined %},
  43. "caption": "{{ nodeInfo.caption }}"{% endif %}
  44. }{% if not loop.last %},{% endif %}
  45. {% endfor %}
  46. ],
  47. {% endif %}
  48. "hwImg": [
  49. {
  50. "thumbnail": "/hwpics/{MODELHASH}.svg",
  51. "caption": "Knoten {MODELHASH}"
  52. }
  53. ]
  54. }