Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix module names, webpack config and fullscreen height #5

Merged
merged 3 commits into from
Dec 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ module.value('config', {
cesiumBase: './node_modules/cesium/Build/Cesium/',
cesiumAccessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzZDk3ZmM0Mi01ZGFjLTRmYjQtYmFkNC02NTUwOTFhZjNlZjMiLCJpZCI6MTE2MSwiaWF0IjoxNTI3MTYxOTc5fQ.tOVBzBJjR3mwO3osvDVB_RwxyLX7W-emymTOkfz6yGA',
newTerrainProviderOptions: {
url: 'http://gis.lesprojekt.cz/cts/tilesets/rostenice_dmp1g/'
url: '//gis.lesprojekt.cz/cts/tilesets/rostenice_dmp1g/'
},
terrain_providers: [{
title: 'Local surface model',
url: 'http://gis.lesprojekt.cz/cts/tilesets/rostenice_dmp1g/',
url: '//gis.lesprojekt.cz/cts/tilesets/rostenice_dmp1g/',
active: true
}, {
title: 'Local terrain model',
url: 'http://gis.lesprojekt.cz/cts/tilesets/rostenice_dmr5g/',
url: '//gis.lesprojekt.cz/cts/tilesets/rostenice_dmr5g/',
active: false
}, {
title: 'EU-DEM',
Expand Down
359 changes: 199 additions & 160 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"acorn": "^6.3.0",
"cesium": "^1.61.0",
"hslayers-ng": "^1.6",
"hslayers-ng": "^1.9.1",
"jquery": "^3.4.1"
},
"devDependencies": {
Expand All @@ -49,7 +49,7 @@
"postcss-prefix-selector": "^1.7.2",
"style-loader": "^0.23.1",
"url-loader": "^1.1.2",
"webpack": "^4.41.0",
"webpack": "^4.41.2",
"webpack-build-notifier": "^1.1.1",
"webpack-cli": "^3.3.9",
"webpack-merge": "^4.2.2"
Expand Down
44 changes: 21 additions & 23 deletions planner/app.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
'use strict';
import toolbar from 'toolbar';
import print from 'print';
import query from 'query';
import search from 'search';
import measure from 'measure';
import permalink from 'permalink';
import info from 'info';
import ds from 'datasource_selector';
import sidebar from 'sidebar';
import 'toolbar.module';
import 'print.module';
import 'query.module';
import 'search.module';
import 'add-layers.module';
import 'measure.module';
import 'permalink.module';
import 'info.module';
import 'datasource-selector.module';
import 'sidebar.module';
import 'draw.module';
import 'add-layers.module';
import bootstrapBundle from 'bootstrap/dist/js/bootstrap.bundle';
import { Tile, Vector as VectorLayer, Group, Image as ImageLayer } from 'ol/layer';
import { TileWMS, Vector as VectorSource, WMTS, OSM, XYZ } from 'ol/source';
import { ImageWMS, ImageArcGISRest } from 'ol/source';
import View from 'ol/View';
import GeoJSON from 'ol/format/GeoJSON';
import { transform, transformExtent } from 'ol/proj';
import ff from 'feature_filter';
import 'feature-filter.module';
import 'angular-material';

var module = angular.module('hs', [
'hs.toolbar',
'hs.layermanager',
'hs.map',
'hs.query',
'ngMaterial',
'ngMaterial',
'hs.search', 'hs.print', 'hs.permalink', 'hs.measure',
'hs.legend', 'hs.geolocation', 'hs.core',
'hs.api',
'hs.addLayers',
'hs.feature_filter',
'hs.featureFilter',
'gettext',
'hs.compositions', 'hs.status_creator',
'hs.compositions', 'hs.save-map',
'hs.sidebar'
]);

Expand All @@ -53,11 +53,10 @@ module.value('config', {
title: 'Podkladové mapy',
layers: [
new Tile({
source: new OSM({
wrapX: false
}),
source: new OSM(),
title: "Base layer",
base: true
base: true,
removable: false
}),
new VectorLayer({
title: "Parcely LPIS",
Expand Down Expand Up @@ -112,11 +111,10 @@ module.value('config', {
}]
});

module.controller('Main', ['$scope', 'Core', 'hs.compositions.service_parser', 'config',
function ($scope, Core, composition_parser, config) {
$scope.hsl_path = hsl_path; //Get this from hslayers.js file
module.controller('Main', ['$scope', 'Core', 'config', 'hs.layout.service',
function ($scope, Core, config, layoutService) {
$scope.Core = Core;
Core.sidebarRight = false;
layoutService.sidebarRight = false;
Core.singleDatasources = true;
}
]);
2 changes: 1 addition & 1 deletion planner/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<% } %>
</head>
<body >
<div hs ng-app="hs" ng-controller="Main" style="position: relative;"></div>
<div hs ng-app="hs" ng-controller="Main" style="position: relative; height:100vh"></div>
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
<script type="application/javascript" src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
<% } %>
Expand Down
14 changes: 6 additions & 8 deletions planner/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
const merge = require('webpack-merge');
const common = require('./webpack.common');
const path = require('path');
const common_paths = require(path.join( __dirname, '../../hslayers-ng/common_paths'));
const common_paths = require(path.join(__dirname, '../node_modules/hslayers-ng/common_paths'));

module.exports = merge(common, {
mode: 'development',
devtool: 'cheap-eval-source-map',
watchOptions: { ignored: /node_modules/ },
//watchOptions: { ignored: /node_modules/ },
resolve: { symlinks: false,
modules: [
path.join(__dirname),
"node_modules",
"../../"
__dirname,
path.join(__dirname, "../node_modules"),
path.join(__dirname, "../node_modules", "hslayers-ng")
].concat(common_paths.paths)
},
optimization: {
Expand All @@ -40,8 +40,7 @@ module.exports = merge(common, {
// Load css files which will be injected in html page at startup <style>...</style>)
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ],
include: [path.resolve(__dirname), path.resolve(__dirname, '../../')]
use: [ 'style-loader', 'css-loader' ]
},
{
test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/,
Expand All @@ -56,7 +55,6 @@ module.exports = merge(common, {
// Load angularJS partials HTML file as URL
{
test: /\.html$/,
include: [path.resolve(__dirname), path.resolve(__dirname, '../../')],
exclude: path.resolve(__dirname, 'src/index.html'),
use: [
'ng-cache-loader?prefix=[dir]/[dir]',
Expand Down
14 changes: 6 additions & 8 deletions planner/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const hslPaths = require(path.join(__dirname, '../../hslayers-ng/common_paths'));
const common_paths = require(path.join(__dirname, '../node_modules/hslayers-ng/common_paths'));

module.exports = merge(common, {
mode: 'production',
Expand All @@ -31,10 +31,10 @@ module.exports = merge(common, {
resolve: {
symlinks: false,
modules: [
path.join(__dirname),
"node_modules",
"../../"
].concat(hslPaths.paths)
__dirname,
path.join(__dirname, "../node_modules"),
path.join(__dirname, "../node_modules", "hslayers-ng")
].concat(common_paths.paths)
},
plugins: [
// Extract CSS into separated css files
Expand Down Expand Up @@ -85,8 +85,7 @@ module.exports = merge(common, {
options: { publicPath: '' }
},
'css-loader'
],
include: [path.resolve(__dirname), path.resolve(__dirname, '../../')]
]
},
{
test: /\.(woff(2)?|ttf|eot)(\?v=\d+\.\d+\.\d+)?$/,
Expand Down Expand Up @@ -119,7 +118,6 @@ module.exports = merge(common, {
// AngularJS templates are cached using cache template
{
test: /\.html$/,
include: [path.resolve(__dirname, 'src'), path.resolve(__dirname, '../../')],
exclude: path.resolve(__dirname, 'src/index.html'),
use: [
'ng-cache-loader?prefix=[dir]/[dir]',
Expand Down
4 changes: 2 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
.hs-lm-warning-scale{visibility:hidden}
</style>
</head>
<body >
<div hs ng-app="hs" ng-controller="Main" style="position: relative; height:100%"></div>
<body>
<div hs ng-app="hs" ng-controller="Main" style="position: relative; height:100vh"></div>
<script src="./node_modules/cesium/Build/Cesium/Cesium.js"></script>
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
<script type="application/javascript" src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
Expand Down