Overview:
This article explains how to show all results at once as a flat list in the viewer. It overrides the default view which shows results grouped according to their corresponding layers or groups.
Viewers previous to GVH 2.8 had the results list shown as a single level view of all results, regardless of their layers or groups.
Since GVH 2.8, the default results view shows results grouped into their layers:
This gives a more organized view, and allows the user to know quickly which layers have results in them. To simplify presentation, results are highlighted in the viewer when the user selects one of the resulting layers:
In some cases, you may want to revert your results list back to the classic non grouped view. This article will explain how to modify your viewer configuration files to revert to the classic view. Please note that this is considered a legacy configuration, and it may not be available on future versions of the viewer, but as of GVH 2.12 it does still work.
Solution:
We will first describe the edits for the desktop.json.js and tablet.json.js files. There are slightly different edits for the handheld viewer which we will cover later.
Edits for Desktop and Tablet shells
- Navigate to your viewer configuration directory:
- Back up your Desktop.json.js, Tablet.json.js, and Handheld.json.js files
- Edit your desktop.json.js file
- Search the file for the following string:
- In this Results module, replace the "views" and "viewModels" section with the following entries:
"views": [ { "id": "ResultsListView", "viewModelId": "ResultsListViewModel", "libraryId": "Mapping.Infrastructure", "iconUri": "Resources/Images/Icons/Toolbar/search-24.png", "type": "geocortex.essentialsHtmlViewer.mapping.infrastructure.results.ResultsListView", "markup": "Mapping/infrastructure/results/ResultsListView.html", "region": "DataFrameResultsContainerRegion", "visible": false, "title": "@language-common-results", "description": "@language-common-query-results", "configuration": { "contentField": "longDescription", "isPaged": true, "pageSize": 50 } }, { "id": "ResultsTableView", "viewModelId": "ResultsTableViewModel", "libraryId": "Mapping.Infrastructure", "iconUri": "Resources/Images/Icons/Toolbar/search-24.png", "type": "geocortex.essentialsHtmlViewer.mapping.infrastructure.results.ResultsTableView", "markup": "Mapping/infrastructure/results/ResultsTableView.html", "region": "ResultsRegion", "visible": false, "configuration": { "isPaged": true, "pageSize": 50 } } ], "viewModels": [ { "id": "ResultsListViewModel", "type": "geocortex.essentialsHtmlViewer.mapping.infrastructure.results.FlatResultsViewModel", "configuration": {} }, { "id": "ResultsTableViewModel", "type": "geocortex.essentialsHtmlViewer.mapping.infrastructure.results.TabbedResultsViewModel", "configuration": {} } ]
- Search the file for the following string:
- In this Menu module, we are going to add a new element. Add the "ResultsListActions" element right after the following line:
"menus": [
{ "id": "ResultsListActions", "description": "@language-menu-results-list-actions-desc", "items": [ { "text": "@language-results-toggle-table-view", "description": "@language-results-toggle-table-view-desc", "iconUri": "Resources/Images/Icons/Toolbar/view-switch-table-24.png", "libraryId": "Mapping.Infrastructure", "hideOnDisable": true, "batch": [ { "command": "ShowResultsTable", "commandParameter": "{{context}}", "abortBatchOnFailure": true }, { "command": "CloseDataFrame" } ] }, { "text": "@language-menu-identify-buffered-feature-set-collection", "description": "@language-menu-identify-buffered-feature-set-collection-desc", "iconUri": "Resources/Images/Icons/Toolbar/buffer-shape-24.png", "hideOnDisable": true, "command": "IdentifyBufferedFeatureSetCollection", "commandParameter": "{{context}}" }, { "text": "@language-menu-show-charting-view", "description": "@language-menu-show-charting-view-desc", "iconUri": "Resources/Images/Icons/Toolbar/charting-24.png", "hideOnDisable": true, "command": "ShowChartingView" }, { "text": "@language-menu-export-results-to-csv", "description": "@language-menu-export-results-to-csv-desc", "iconUri": "Resources/Images/Icons/Toolbar/csv-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "csv", "fsc": "{{context}}" } }, { "text": "@language-menu-export-results-to-xlsx", "description": "@language-menu-export-results-to-xlsx-desc", "iconUri": "Resources/Images/Icons/Toolbar/xlsx-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "xlsx", "fsc": "{{context}}" } }, { "text": "@language-menu-export-results-to-shp", "description": "@language-menu-export-results-to-shp-desc", "iconUri": "Resources/Images/Icons/Toolbar/shapefile-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "shp", "fsc": "{{context}}" } }, { "text": "@language-menu-run-report", "description": "@language-menu-run-report-desc", "iconUri": "Resources/Images/Icons/Toolbar/reports-24.png", "command": "ListReports", "commandParameter": "{{context}}", "hideOnDisable": true }, { "text": "@language-menu-browse-saved-results", "description": "@language-menu-browse-saved-results-desc", "iconUri": "Resources/Images/Icons/Toolbar/open-24.png", "command": "ListSelections", "hideOnDisable": false }, { "text": "@language-menu-save-results", "description": "@language-menu-save-results-desc", "iconUri": "Resources/Images/Icons/Toolbar/save-24.png", "command": "ShowSaveSelectionDialog", "commandParameter": "{{context}}", "hideOnDisable": false }, { "text": "@language-menu-combine-results", "description": "@language-menu-combine-results-desc", "iconUri": "Resources/Images/Icons/Toolbar/refine-results-24.png", "command": "ShowSearchOptions", "commandParameter": "{{context}}", "hideOnDisable": false } ] },
The element should look like this:
{ "moduleName": "Menu", "moduleType": "geocortex.essentialsHtmlViewer.mapping.modules.Menu.MenuModule", "configuration": { "menus": [ { "id": "ResultsListActions", "description": "@language-menu-results-list-actions-desc", "items": [ { "text": "@language-results-toggle-table-view", "description": "@language-results-toggle-table-view-desc", "iconUri": "Resources/Images/Icons/Toolbar/view-switch-table-24.png", "libraryId": "Mapping.Infrastructure", "hideOnDisable": true, "batch": [ ...........
- Repeat step 3 to 7 for the Tablet.json.js file.
Edits for Handheld Shell
- Edit your handheld.json.js file in a text editor.
- Search the file for the following string:
- In this Results module, replace the "views" and "viewModels" section with the following entries:
"views": [ { "id": "ResultsListView", "viewModelId": "ResultsViewModel", "libraryId": "Mapping.Infrastructure", "isManaged": false, "visible": true, "title": "@language-common-results", "iconUri": "Resources/Images/Icons/results.png", "description": "@language-common-query-results", "type": "geocortex.essentialsHtmlViewer.mapping.infrastructure.results.ResultsListView", "markup": "Mapping/infrastructure/results/ResultsListView.html", "region": "ResultsViewContainerRegion", "configuration": { "contentField": "longDescription", "isPaged": true, "pageSize": 10 } }, { "id": "ResultsFeatureActionsView", "viewModelId": "ResultsViewModel", "libraryId": "Mapping.Infrastructure", "isManaged": false, "visible": false, "title": "@language-common-results", "description": "@language-common-query-results", "type": "geocortex.essentialsHtmlViewer.mapping.infrastructure.results.ResultsFeatureActionsView", "markup": "Mapping/infrastructure/results/ResultsFeatureActionsView.html", "region": "ResultsViewContainerRegion", "configuration": {} } ], "viewModels": [ { "id": "ResultsViewModel", "type": "geocortex.essentialsHtmlViewer.mapping.infrastructure.results.FlatResultsViewModel", "configuration": {} } ]
- Search the file for the following string:
- In this Menu module, we are going to add a new element. Add the "ResultsListActions" element right after the following line:
"menus": [
{ "id": "ResultsListActions", "description": "@language-menu-results-list-actions-desc", "defaultIconUri": "Resources/Images/Icons/check-24.png", "items": [ { "text": "@language-menu-zoom-to-all", "description": "@language-menu-zoom-to-all-desc", "iconUri": "Resources/Images/Icons/Toolbar/zoom-extent-24.png", "command": "ZoomToFeatureSetCollection", "commandParameter": "{{context}}" }, { "text": "@language-menu-show-charting-view", "description": "@language-menu-show-charting-view-desc", "iconUri": "Resources/Images/Icons/Toolbar/charting-24.png", "hideOnDisable": true, "command": "ShowChartingView" }, { "text": "@language-menu-identify-buffered-feature-set-collection", "description": "@language-menu-identify-buffered-feature-set-collection-desc", "iconUri": "Resources/Images/Icons/Toolbar/buffer-shape-24.png", "hideOnDisable": true, "command": "IdentifyBufferedFeatureSetCollection", "commandParameter": "{{context}}" }, { "text": "@language-menu-export-results-to-csv", "description": "@language-menu-export-results-to-csv-desc", "iconUri": "Resources/Images/Icons/Toolbar/csv-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "csv", "fsc": "{{context}}" } }, { "text": "@language-menu-export-results-to-xlsx", "description": "@language-menu-export-results-to-xlsx-desc", "iconUri": "Resources/Images/Icons/Toolbar/xlsx-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "xlsx", "fsc": "{{context}}" } }, { "text": "@language-menu-export-results-to-shp", "description": "@language-menu-export-results-to-shp-desc", "iconUri": "Resources/Images/Icons/Toolbar/shapefile-export-24.png", "hideOnDisable": true, "command": "ExportResultsTo", "commandParameter": { "format": "shp", "fsc": "{{context}}" } }, { "text": "@language-menu-run-report", "description": "@language-menu-run-report-desc", "iconUri": "Resources/Images/Icons/Toolbar/reports-24.png", "command": "ListReports", "commandParameter": "{{context}}", "hideOnDisable": true }, { "text": "@language-menu-browse-saved-results", "description": "@language-menu-browse-saved-results-desc", "iconUri": "Resources/Images/Icons/Toolbar/open-24.png", "command": "ListSelections", "hideOnDisable": false }, { "text": "@language-menu-save-results", "description": "@language-menu-save-results-desc", "iconUri": "Resources/Images/Icons/Toolbar/save-24.png", "command": "ShowSaveSelectionDialog", "commandParameter": "{{context}}", "hideOnDisable": false }, { "text": "@language-menu-combine-results", "description": "@language-menu-combine-results-desc", "iconUri": "Resources/Images/Icons/Toolbar/refine-results-24.png", "command": "ShowSearchOptions", "commandParameter": "{{context}}", "hideOnDisable": false } ] },
The element should look like this:
{ "moduleName": "Menu", "moduleType": "geocortex.essentialsHtmlViewer.mapping.modules.Menu.MenuModule", "configuration": { "menus": [ { "id": "ResultsListActions", "description": "@language-menu-results-list-actions-desc", .............
Once all of these changes have been made, when you make a selection in your viewer, you should be able to see all results in one list, regardless of layer or group.
Comments
0 comments
Article is closed for comments.