|
@@ -15,27 +15,17 @@ import 'hslayers-ng/components/datasource-selector/datasource-selector.module';
|
|
|
//import 'hslayers-ng/components/toolbar';
|
|
//import 'hslayers-ng/components/toolbar';
|
|
|
// hslayers-ng components must be loaded first, otherwise angular will be undefined
|
|
// hslayers-ng components must be loaded first, otherwise angular will be undefined
|
|
|
// eslint-disable-next-line sort-imports-es6-autofix/sort-imports-es6
|
|
// eslint-disable-next-line sort-imports-es6-autofix/sort-imports-es6
|
|
|
-import './adjuster';
|
|
|
|
|
import './app.css';
|
|
import './app.css';
|
|
|
import * as angular from 'angular';
|
|
import * as angular from 'angular';
|
|
|
-import View from 'ol/View';
|
|
|
|
|
-import {OSM} from 'ol/source';
|
|
|
|
|
-import {Tile} from 'ol/layer';
|
|
|
|
|
import {downgradeInjectable} from '@angular/upgrade/static';
|
|
import {downgradeInjectable} from '@angular/upgrade/static';
|
|
|
|
|
|
|
|
import './adjuster/';
|
|
import './adjuster/';
|
|
|
import {AppModule} from './app.module';
|
|
import {AppModule} from './app.module';
|
|
|
|
|
+import {AppConfig} from './app.config';
|
|
|
import {AppService} from './app.service';
|
|
import {AppService} from './app.service';
|
|
|
-import {HsComponent, nuts2Layer, nuts3Layer} from './app.component';
|
|
|
|
|
|
|
+import {HsComponent} from './app.component';
|
|
|
//import {downgrade} from 'hslayers-ng/common/downgrader';
|
|
//import {downgrade} from 'hslayers-ng/common/downgrader';
|
|
|
|
|
|
|
|
-function getHostname() {
|
|
|
|
|
- const url = window.location.href;
|
|
|
|
|
- const urlArr = url.split('/');
|
|
|
|
|
- const domain = urlArr[2];
|
|
|
|
|
- return urlArr[0] + '//' + domain;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
//export const downgradedModule = downgrade(AppModule);
|
|
//export const downgradedModule = downgrade(AppModule);
|
|
|
|
|
|
|
|
//angular.module(downgradedModule, []);
|
|
//angular.module(downgradedModule, []);
|
|
@@ -61,66 +51,6 @@ export default angular
|
|
|
'gettext',
|
|
'gettext',
|
|
|
'pra.adjuster',
|
|
'pra.adjuster',
|
|
|
])
|
|
])
|
|
|
- .value('HsConfig', {
|
|
|
|
|
- useProxy: false,
|
|
|
|
|
- //proxyPrefix: '../8085/',
|
|
|
|
|
- default_layers: [
|
|
|
|
|
- new Tile({
|
|
|
|
|
- source: new OSM({
|
|
|
|
|
- url:
|
|
|
|
|
- 'https://cartodb-basemaps-{a-d}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png',
|
|
|
|
|
- attributions: [
|
|
|
|
|
- '© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors,',
|
|
|
|
|
- '<a href="https://carto.com/attributions">CARTO</a>',
|
|
|
|
|
- ],
|
|
|
|
|
- }),
|
|
|
|
|
- title: 'OpenStreetMap',
|
|
|
|
|
- base: true,
|
|
|
|
|
- removable: false,
|
|
|
|
|
- }),
|
|
|
|
|
- nuts3Layer,
|
|
|
|
|
- nuts2Layer,
|
|
|
|
|
- ],
|
|
|
|
|
- popUpDisplay: 'hover',
|
|
|
|
|
- project_name: 'erra/map',
|
|
|
|
|
- default_view: new View({
|
|
|
|
|
- center: [2433348.3022471312, 7744501.813885343],
|
|
|
|
|
- zoom: 3.6,
|
|
|
|
|
- units: 'm',
|
|
|
|
|
- }),
|
|
|
|
|
- advanced_form: true,
|
|
|
|
|
- datasources: [
|
|
|
|
|
- {
|
|
|
|
|
- title: 'Metadata catalogue',
|
|
|
|
|
- url: 'https://polirural-cat.lesprojekt.cz/micka2/csw',
|
|
|
|
|
- language: 'eng',
|
|
|
|
|
- type: 'micka',
|
|
|
|
|
- code_list_url:
|
|
|
|
|
- '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',
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- hostname: {
|
|
|
|
|
- default: {
|
|
|
|
|
- title: 'Default',
|
|
|
|
|
- type: 'default',
|
|
|
|
|
- editable: false,
|
|
|
|
|
- url: getHostname(),
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- panelWidths: {},
|
|
|
|
|
- // allowAddExternalDatasets: false,
|
|
|
|
|
- panelsEnabled: {
|
|
|
|
|
- composition_browser: false,
|
|
|
|
|
- feature_crossfilter: false,
|
|
|
|
|
- saveMap: false,
|
|
|
|
|
- sensors: false,
|
|
|
|
|
- tracking: false,
|
|
|
|
|
- routing: false,
|
|
|
|
|
- permalink: false,
|
|
|
|
|
- language: false,
|
|
|
|
|
- legend: false,
|
|
|
|
|
- },
|
|
|
|
|
- sizeMode: 'fullscreen',
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ .value('HsConfig', AppConfig)
|
|
|
.component('hs', HsComponent)
|
|
.component('hs', HsComponent)
|
|
|
.service('AppService', downgradeInjectable(AppService));
|
|
.service('AppService', downgradeInjectable(AppService));
|