You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

130 lines
4.5 KiB

5 years ago
  1. <?php
  2. // Repositories from which to read the categories.
  3. // repositoryUrl and categoryUrl are twig templates, which take the following input values:
  4. // {{ repositoryId }} id of the repository
  5. // {{ categoryId }} id of the category (not for repositoryUrl)
  6. // {{ branchId }} id of the branch (not for repositoryUrl)
  7. $repositories = array(
  8. 'default' => array(
  9. 'path' => 'node_modules/openstreetbrowser-categories-main',
  10. 'type' => 'dir',
  11. // public URL of repository
  12. 'repositoryUrl' => 'https://github.com/example/categories',
  13. // public URL of source of a category in repository
  14. 'categoryUrl' => 'https://github.com/example/categories/tree/{{ branchId }}/{{ categoryId }}.json',
  15. ),
  16. );
  17. // Repositories which should be included from gitea
  18. $repositoriesGitea = array(
  19. 'path' => "/home/gitea/gitea-repositories",
  20. 'url' => "https://www.openstreetbrowser.org/dev",
  21. );
  22. // Set to true to reload categories on every page visit.
  23. $config['categoriesAlwaysReload'] = true;
  24. // (optional) URL, which points to the OpenStreetBrowser Editor
  25. #$config['urlCategoriesEditor'] = 'editor/';
  26. // URL of OpenStreetMap website - change this for other services
  27. $config['urlOpenStreetMap'] = 'https://www.openstreetmap.org';
  28. // URL of the Overpass API
  29. $config['overpassUrl'] = array(
  30. '//overpass-api.de/api/interpreter',
  31. '//api.openstreetmap.fr/oapi/interpreter',
  32. );
  33. // Additional parameters to Overpass (e.g. timeGap)
  34. $config['overpassOptions'] = array(
  35. );
  36. // Acquire a license key from https://www.maxmind.com/ and set it here
  37. #$config['GeoLite2-LicenseKey'] = '';
  38. // Location of the initial view if no IP-location can be resolved. 'zoom' is optional.
  39. $config['defaultView'] = array('lat' => 51.505, 'lon' => -0.09, 'zoom' => 18);
  40. // Shall the initial map view be retrieved via IP location? (default: true)
  41. $config['checkIpLocation'] = true;
  42. // maxZoom (tiles will be scaled if higher than native zoom level). Default: 19.
  43. $config['maxZoom'] = 19;
  44. // cache directory. Must be writeable by the webserver!
  45. #$config['cache'] = 'cache';
  46. // Available base maps; first is default
  47. $config['baseMaps'] = array(
  48. array(
  49. 'id' => 'osm-mapnik',
  50. 'name' => 'OSM Default',
  51. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
  52. 'url' => '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
  53. 'maxZoom' => 19,
  54. ),
  55. array(
  56. 'id' => 'osm-cyle',
  57. 'name' => 'OSM CycleMap',
  58. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Tiles: <a href="http://www.thunderforest.com/">Andy Allan</a>',
  59. 'url' => '//{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=',
  60. 'maxZoom' => 18,
  61. ),
  62. array(
  63. 'id' => 'opentopomap',
  64. 'name' => 'OpenTopoMap',
  65. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Tiles: <a href="http://opentopomap.org/">OpenTopoMap</a>',
  66. 'url' => '//{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
  67. 'maxZoom' => 17,
  68. ),
  69. array(
  70. 'id' => 'transportmap',
  71. 'name' => 'Transport Map',
  72. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Tiles: <a href="http://www.thunderforest.com/">Andy Allan</a>',
  73. 'url' => '//{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey=',
  74. 'maxZoom' => 20,
  75. ),
  76. array(
  77. 'id' => 'hot',
  78. 'name' => 'Humanitarian',
  79. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Tiles: <a href="http://hot.openstreetmap.org/">Humanitarian OpenStreetMap Team</a>',
  80. 'url' => '//tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png',
  81. 'maxZoom' => 20,
  82. ),
  83. );
  84. // List of available user interface languages
  85. $languages = array(
  86. "en", // English
  87. "ast", // Asturian
  88. "ca", // Catalan
  89. "cs", // Czech
  90. "da", // Danish
  91. "de", // German
  92. "el", // Greek
  93. "es", // Spanish
  94. "et", // Estonian
  95. "fr", // French
  96. "hu", // Hungarian
  97. "it", // Italian
  98. "ja", // Japanese
  99. "nl", // Dutch
  100. "oc", // Occitan
  101. "pl", // Polish
  102. "pt", // Portuguese
  103. "pt-br", // Portuguese (Brazil)
  104. "ro", // Romanian
  105. "ru", // Russian
  106. "sr", // Serbian
  107. "uk", // Ukrainian
  108. "nb", // Bokmål (Norwegian)
  109. "tr", // Turkish
  110. "zh-hans", // Simplified Chinese
  111. );
  112. // Uncomment the following lines to use a MYSQL database for session handling.
  113. // Create database table 'sessions' as described in
  114. // https://github.com/plepe/PHP-MySQL-Sessions/blob/master/README.md
  115. #include "lib/modulekit/mysql-sessions/mysql.sessions.php";
  116. #new Session(new PDO('mysql:dbname=DB', 'USER', 'PASSWORD'));