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.

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