Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…form/geoview into 1309-datatable-language
  • Loading branch information
kaminderpal committed Oct 4, 2023
2 parents eb3db7f + a4e8ff6 commit 3a0c7fb
Show file tree
Hide file tree
Showing 21 changed files with 288 additions and 167 deletions.
33 changes: 18 additions & 15 deletions packages/geoview-core/public/templates/layers/esri-dynamic.html
Original file line number Diff line number Diff line change
Expand Up @@ -762,37 +762,40 @@ <h4 id="HLYR3">3. Date filtering using ISO UTC dates</h4>

window.setInterval(() => {
const displayField1 = document.getElementById('HLYR1-state');
const geoviewLayers = cgpv.api.maps?.LYR1?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR1').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR1?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR1?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR1.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField1.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField1.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField1.textContent = '(undefined)';
}, 250)

window.setInterval(() => {
const displayField2 = document.getElementById('HLYR2-state');
const geoviewLayers = cgpv.api.maps?.LYR2?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR2').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR2?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR2?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR2.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField2.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField2.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField2.textContent = '(undefined)';
}, 250)

window.setInterval(() => {
const displayField3 = document.getElementById('HLYR3-state');
const geoviewLayers = cgpv.api.maps?.LYR3?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR3').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR3?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR3?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR3.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField3.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField3.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';;
} else displayField3.textContent = '(undefined)';
}, 250)

Expand Down
33 changes: 18 additions & 15 deletions packages/geoview-core/public/templates/layers/esri-feature.html
Original file line number Diff line number Diff line change
Expand Up @@ -406,37 +406,40 @@ <h4 id="HLYR3">3. Date filtering using ISO UTC dates</h4>

window.setInterval(() => {
const displayField1 = document.getElementById('HLYR1-state');
const geoviewLayers = cgpv.api.maps?.LYR1?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR1').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR1?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR1?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR1.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField1.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField1.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField1.textContent = '(undefined)';
}, 250)

window.setInterval(() => {
const displayField2 = document.getElementById('HLYR2-state');
const geoviewLayers = cgpv.api.maps?.LYR2?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR2').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR2?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR2?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR2.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField2.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField2.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField2.textContent = '(undefined)';
}, 250)

window.setInterval(() => {
const displayField3 = document.getElementById('HLYR3-state');
const geoviewLayers = cgpv.api.maps?.LYR3?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR3').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR3?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR3?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR3.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField3.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField3.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField3.textContent = '(undefined)';
}, 250)

Expand Down
12 changes: 6 additions & 6 deletions packages/geoview-core/public/templates/layers/geocore.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,14 @@ <h4 id="HLYR1">1. Many GeoCore Layers</h4>

window.setInterval(() => {
const displayField1 = document.getElementById('HLYR1-state');
const geoviewLayers = cgpv.api.maps?.LYR1?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR1').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR1?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps?.LYR1?.layer?.geoviewLayers[layerId].geoviewLayerName.en;
const stateValue = cgpv.api.maps?.LYR1?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerName}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR1.layer.geoviewLayers[layerId.split('/')[0]].geoviewLayerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField1.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField1.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField1.textContent = '(undefined)';
}, 250)

Expand Down
11 changes: 6 additions & 5 deletions packages/geoview-core/public/templates/layers/geojson.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,14 @@ <h4 id="HLYR1">1. Many GeoJSON Layers</h4>

window.setInterval(() => {
const displayField1 = document.getElementById('HLYR1-state');
const geoviewLayers = cgpv.api.maps?.LYR1?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR1').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR1?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR1?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR1.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField1.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField1.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField1.textContent = '(undefined)';
}, 250)

Expand Down
18 changes: 10 additions & 8 deletions packages/geoview-core/public/templates/layers/geopackage.html
Original file line number Diff line number Diff line change
Expand Up @@ -232,25 +232,27 @@ <h4 id="HLYR2">2. Multiple GeoPackage Layers - one with multiple layers</h4>

window.setInterval(() => {
const displayField1 = document.getElementById('HLYR1-state');
const geoviewLayers = cgpv.api.maps?.LYR1?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR1').resultSets;
if (geoviewLayers) {
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const layerName = cgpv.api.maps.LYR1.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField1.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField1.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField1.textContent = '(undefined)';
}, 250)

window.setInterval(() => {
const displayField1 = document.getElementById('HLYR2-state');
const geoviewLayers = cgpv.api.maps?.LYR2?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR2').resultSets;
if (geoviewLayers) {
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const layerName = cgpv.api.maps.LYR2.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField1.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField1.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField1.textContent = '(undefined)';
}, 250)

Expand Down
11 changes: 6 additions & 5 deletions packages/geoview-core/public/templates/layers/image-static.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,14 @@ <h4 id="HLYR1">1. Static Image Layers</h4>

window.setInterval(() => {
const displayField1 = document.getElementById('HLYR1-state');
const geoviewLayers = cgpv.api.maps?.LYR1?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR1').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR1?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR1?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR1.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField1.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField1.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField1.textContent = '(undefined)';
}, 250)

Expand Down
11 changes: 6 additions & 5 deletions packages/geoview-core/public/templates/layers/ogc-feature.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,14 @@ <h4 id="HLYR1">1. OGC Feature API Layers</h4>

window.setInterval(() => {
const displayField1 = document.getElementById('HLYR1-state');
const geoviewLayers = cgpv.api.maps?.LYR1?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.getFeatureInfoLayerSet('LYR1').resultSets;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR1?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR1?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = cgpv.api.maps.LYR1.layer.registeredLayers[layerId].layerName.en;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField1.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField1.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField1.textContent = '(undefined)';
}, 250)

Expand Down
35 changes: 20 additions & 15 deletions packages/geoview-core/public/templates/layers/vector-tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,37 +196,42 @@ <h4 id="HLYR3">3. Vector Tiles olms library no GeoView</h4>

window.setInterval(() => {
const displayField1 = document.getElementById('HLYR1-state');
const geoviewLayers = cgpv.api.maps?.LYR1?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.maps?.LYR1?.layer?.registeredLayers;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR1?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR1?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = geoviewLayers[layerId].layerName?.en ? geoviewLayers[layerId].layerName?.en : layerId;
const { layerPhase, layerStatus } = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField1.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField1.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField1.textContent = '(undefined)';
}, 250)

window.setInterval(() => {
const displayField2 = document.getElementById('HLYR2-state');
const geoviewLayers = cgpv.api.maps?.LYR2?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.maps?.LYR2?.layer?.registeredLayers;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR2?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR2?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = geoviewLayers[layerId].layerName?.en ? geoviewLayers[layerId].layerName?.en : layerId;
const {layerPhase} = geoviewLayers[layerId];
const {layerStatus} = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField2.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField2.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField2.textContent = '(undefined)';
}, 250)

window.setInterval(() => {
const displayField3 = document.getElementById('HLYR3-state');
const geoviewLayers = cgpv.api.maps?.LYR3?.layer?.geoviewLayers;
const geoviewLayers = cgpv.api.maps?.LYR3?.layer?.registeredLayers;
if (geoviewLayers) {
const output = Object.keys(cgpv.api.maps?.LYR3?.layer?.geoviewLayers).reduce((outputValue, layerId) => {
const stateValue = cgpv.api.maps?.LYR3?.layer?.geoviewLayers[layerId].layerPhase;
return `${outputValue}${layerId}: ${stateValue}, `;
const output = Object.keys(geoviewLayers).reduce((outputValue, layerId) => {
const layerName = geoviewLayers[layerId].layerName?.en ? geoviewLayers[layerId].layerName?.en : layerId;
const {layerPhase} = geoviewLayers[layerId];
const {layerStatus} = geoviewLayers[layerId];
return `${outputValue}${layerName} - status: ${layerStatus}, phase: ${layerPhase}, `;
}, '(');
displayField3.textContent = output ? `${output.slice(0, -2)})` : '(undefined)';
displayField3.textContent = output && output !== '(' ? `${output.slice(0, -2)})` : '(undefined)';
} else displayField3.textContent = '(undefined)';
}, 250)

Expand Down
Loading

0 comments on commit 3a0c7fb

Please sign in to comment.