Skip to content
Draft
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
21 changes: 20 additions & 1 deletion full/appexternal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
function hslayersNgConfig(ol) {
function hslayersNgConfig(ol, appId) {
return {
assetsPath: '../node_modules/hslayers-ng-app/assets/',
proxyPrefix: window.location.hostname.includes('localhost')
? `${window.location.protocol}//${window.location.hostname}:8085/`
: '/proxy/',
default_layers: [
new ol.layer.Tile({
source: new ol.source.OSM(),
Expand All @@ -9,6 +12,22 @@ function hslayersNgConfig(ol) {
visible: true,
removable: false,
}),
appId == 'app-2'
? new ol.layer.Tile({
properties: {
title: 'Latvian municipalities (parent layer)',
},
source: new ol.source.TileWMS({
url: 'https://lvmgeoserver.lvm.lv/geoserver/ows',
params: {
LAYERS: 'publicwfs:LV_admin_vienibas',
INFO_FORMAT: undefined,
FORMAT: 'image/png; mode=8bit',
},
crossOrigin: 'anonymous',
}),
})
: undefined,
],

default_view: new ol.View({
Expand Down
1 change: 1 addition & 0 deletions full/index_external.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
</head>
<body >
<hslayers-app></hslayers-app>
<hslayers-app id="app-2"></hslayers-app>
</body>
</html>