app.config.ts 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import View from 'ol/View';
  2. import {OSM} from 'ol/source';
  3. import {Tile} from 'ol/layer';
  4. function getHostname() {
  5. const url = window.location.href;
  6. const urlArr = url.split('/');
  7. const domain = urlArr[2];
  8. return urlArr[0] + '//' + domain;
  9. }
  10. export const AppConfig = {
  11. useProxy: false,
  12. //proxyPrefix: '../8085/',
  13. default_layers: [
  14. new Tile({
  15. source: new OSM({
  16. url:
  17. 'https://cartodb-basemaps-{a-d}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png',
  18. attributions: [
  19. '© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors,',
  20. '<a href="https://carto.com/attributions">CARTO</a>',
  21. ],
  22. }),
  23. title: 'OpenStreetMap',
  24. base: true,
  25. removable: false,
  26. }),
  27. ],
  28. popUpDisplay: 'hover',
  29. queryPoint: 'hidden',
  30. project_name: 'erra/map',
  31. default_view: new View({
  32. center: [2433348.3022471312, 7744501.813885343],
  33. zoom: 3.6,
  34. units: 'm',
  35. }),
  36. advanced_form: true,
  37. datasources: [
  38. {
  39. title: 'Metadata catalogue',
  40. url: 'https://polirural-cat.lesprojekt.cz/micka2/csw',
  41. language: 'eng',
  42. type: 'micka',
  43. code_list_url:
  44. 'https://polirural-cat.lesprojekt.cz/micka2/util/codelists.php?_dc=1440156028103&language=eng&page=1&start=0&limit=25&filter=%5B%7B%22property%22%3A%22label%22%7D%5D',
  45. },
  46. ],
  47. hostname: {
  48. default: {
  49. title: 'Default',
  50. type: 'default',
  51. editable: false,
  52. url: getHostname(),
  53. },
  54. },
  55. panelWidths: {},
  56. // allowAddExternalDatasets: false,
  57. panelsEnabled: {
  58. composition_browser: false,
  59. feature_crossfilter: false,
  60. info: false,
  61. saveMap: false,
  62. sensors: false,
  63. tracking: false,
  64. routing: false,
  65. permalink: false,
  66. language: false,
  67. legend: false,
  68. feature_table: false,
  69. },
  70. sidebarPosition: 'left',
  71. sizeMode: 'fullscreen',
  72. };
  73. export default AppConfig;