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.

122 lines
4.3 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. // Location of the initial view if no IP-location can be resolved. 'zoom' is optional.
  34. $config['defaultView'] = array('lat' => 51.505, 'lon' => -0.09, 'zoom' => 18);
  35. // Shall the initial map view be retrieved via IP location? (default: true)
  36. $config['checkIpLocation'] = true;
  37. // maxZoom (tiles will be scaled if higher than native zoom level). Default: 19.
  38. $config['maxZoom'] = 19;
  39. // cache directory. Must be writeable by the webserver!
  40. #$config['cache'] = 'cache';
  41. // Available base maps; first is default
  42. $config['baseMaps'] = array(
  43. array(
  44. 'id' => 'osm-mapnik',
  45. 'name' => 'OSM Default',
  46. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
  47. 'url' => '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
  48. 'maxZoom' => 19,
  49. ),
  50. array(
  51. 'id' => 'osm-cyle',
  52. 'name' => 'OSM CycleMap',
  53. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Tiles: <a href="http://www.thunderforest.com/">Andy Allan</a>',
  54. 'url' => '//{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=',
  55. 'maxZoom' => 18,
  56. ),
  57. array(
  58. 'id' => 'opentopomap',
  59. 'name' => 'OpenTopoMap',
  60. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Tiles: <a href="http://opentopomap.org/">OpenTopoMap</a>',
  61. 'url' => '//{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
  62. 'maxZoom' => 17,
  63. ),
  64. array(
  65. 'id' => 'transportmap',
  66. 'name' => 'Transport Map',
  67. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Tiles: <a href="http://www.thunderforest.com/">Andy Allan</a>',
  68. 'url' => '//{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey=',
  69. 'maxZoom' => 20,
  70. ),
  71. array(
  72. 'id' => 'hot',
  73. 'name' => 'Humanitarian',
  74. 'attribution' => '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, Tiles: <a href="http://hot.openstreetmap.org/">Humanitarian OpenStreetMap Team</a>',
  75. 'url' => '//tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png',
  76. 'maxZoom' => 20,
  77. ),
  78. );
  79. // List of available user interface languages
  80. $languages = array(
  81. "en", // English
  82. "ast", // Asturian
  83. "ca", // Catalan
  84. "cs", // Czech
  85. "da", // Danish
  86. "de", // German
  87. "el", // Greek
  88. "es", // Spanish
  89. "et", // Estonian
  90. "fr", // French
  91. "hu", // Hungarian
  92. "it", // Italian
  93. "ja", // Japanese
  94. "nl", // Dutch
  95. "oc", // Occitan
  96. "pl", // Polish
  97. "pt", // Portuguese
  98. "pt-br", // Portuguese (Brazil)
  99. "ro", // Romanian
  100. "ru", // Russian
  101. "sr", // Serbian
  102. "uk", // Ukrainian
  103. "nb", // Bokmål (Norwegian)
  104. "tr", // Turkish
  105. );
  106. // Uncomment the following lines to use a MYSQL database for session handling.
  107. // Create database table 'sessions' as described in
  108. // https://github.com/plepe/PHP-MySQL-Sessions/blob/master/README.md
  109. #include "lib/modulekit/mysql-sessions/mysql.sessions.php";
  110. #new Session(new PDO('mysql:dbname=DB', 'USER', 'PASSWORD'));