app.config.ts 1.9 KB

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