Zum Hauptinhalt gehen

EXPORT TO XLS/CSV/SHAPE

Kommentare

13 Kommentare

  • Permanently deleted user

    Hello Guido,

     

    You can remove and add commands to the results list action menu in the appropriate configuration.json file (Example: C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\<site_name>\Viewers\<viewer_name>\VirtualDirectory\Resources\Config\Default\Desktop.json.js) 

     

    The id you will be looking for is the ResultsListActions (performing a search for "ResultsListActions" in your text editor should direct you to that section immediatly)

     

    By default the section will look something like this:

     

     

    {

     

        "id": "ResultsListActions",

     

        "description": "@language-menu-results-list-actions-desc",

     

        "items": [

     

            {

     

                "text": "@language-results-toggle-table-view",

     

                "description": "@language-results-toggle-table-view-desc",

     

                "libraryId": "Mapping.Infrastructure",

     

                "hideOnDisable": true,

     

                "batch": [

     

                    {

     

                        "command": "ShowResultsTable",

     

                        "commandParameter": "{{context}}",

     

                        "abortBatchOnFailure": true

     

                    },

     

                    {

     

                        "command": "CloseDataFrame"

     

                    }

     

                ]

     

            },

     

            {

     

                "text": "@language-menu-show-charting-view",

     

                "description": "@language-menu-show-charting-view-desc",

     

                "hideOnDisable": true,

     

                "command": "ShowChartingView"

     

            },

     

            {

     

                "text": "@language-menu-export-results-to-csv",

     

                "description": "@language-menu-export-results-to-csv-desc",

     

                "hideOnDisable": true,

     

                "command": "ExportResultsTo",

     

                "commandParameter": {

     

                    "format": "csv",

     

                    "fsc": "{{context}}"

     

                }

     

            },

     

            {

     

                "text": "@language-menu-export-results-to-xlsx",

     

                "description": "@language-menu-export-results-to-xlsx-desc",

     

                "hideOnDisable": true,

     

                "command": "ExportResultsTo",

     

                "commandParameter": {

     

                    "format": "xlsx",

     

                    "fsc": "{{context}}"

     

                }

     

            },

     

            {

     

                "text": "@language-menu-export-results-to-shp",

     

                "description": "@language-menu-export-results-to-shp-desc",

     

                "hideOnDisable": true,

     

                "command": "ExportResultsTo",

     

                "commandParameter": {

     

                    "format": "shp",

     

                    "fsc": "{{context}}"

     

                }

     

            }

     

        ]

     

    }

     

     

    The content in bold are the actions you are looking to remove.

     

    Let me know if that helped, and if you have any other questions!

     

    Cory Purnell

     

    Latitude Geographics Quality Assurance Team
    0
  • Permanently deleted user

    Cory,

    I was looking at how to disable these options and your instructions worked fine for me.

    I did notice though, that when I click on any of the download options, the extract.zip file always contains a shapefile extract - even when selecting CSV or XLSX format.  Is there something else that needs to be done/installed in order to get CSV and XLS formats to work properly?

    Peter.

    0
  • Permanently deleted user

    I was following Cory's instructions on how to remove the export functions from the results screen, which I was successfully able to do.

    But I left the command "Switch to Table View". But if you go and switch to table view, the export commands are still active in the table view.

    Is there another part of the default.json.js file that controls the functions while in table view?

    Walter

    0
  • Kathy Andersen

    Walter,

    Search for ResultsTableActions to remove the export options from the table view.

    0
  • Permanently deleted user

    That did it. Thanks Kathy.

    Walter

     

    0
  • Permanently deleted user

    Are these options available for HTML5 viewer?  If so can someone tell me how to activate them in HTML5?

    We would like to be able to provide Export capability similar to the Silverlight viewer.

    Thanks,

    Nate

    0
  • Permanently deleted user

    Nathan,

    Edit your default.json.js file and search for "ResultsListAction" and "ResultsTableActions". You'll see in those sections the 3x export functions. 

    By default, they should already be activated.

    Walter

    0
  • Permanently deleted user

    I did a search for ResultsListActions and I do not have this term in the Desktop.json.js file.

    I do have a "ResultsListView", but not a ResultsListActions.

     

    is the ResultsListActions supposed to be part of the Desktop.json.js file by default?

    Thanks

    0
  • Permanently deleted user

     

    Cory,

    I tryed to remove the part of a code from Desktop.json.js for one of my website, but once I do it and save the file it would not load my site. Thanks.

     

            {

     

                "text": "@language-menu-export-results-to-csv",

     

                "description": "@language-menu-export-results-to-csv-desc",

     

                "hideOnDisable": true,

     

                "command": "ExportResultsTo",

     

                "commandParameter": {

     

                    "format": "csv",

     

                    "fsc": "{{context}}"

     

                }

     

            },

     

            {

     

                "text": "@language-menu-export-results-to-xlsx",

     

                "description": "@language-menu-export-results-to-xlsx-desc",

     

                "hideOnDisable": true,

     

                "command": "ExportResultsTo",

     

                "commandParameter": {

     

                    "format": "xlsx",

     

                    "fsc": "{{context}}"

     

                }

     

            },

     

            {

     

                "text": "@language-menu-export-results-to-shp",

     

                "description": "@language-menu-export-results-to-shp-desc",

     

                "hideOnDisable": true,

     

                "command": "ExportResultsTo",

     

                "commandParameter": {

     

                    "format": "shp",

     

                    "fsc": "{{context}}"

     

                }

     

            }

     

    0
  • Chris Roberts

    Hi Nataliya

     

    Did you make sure that you also deleted the coma after the last curly bracket?

    0
  • Kevin Penner

    (http://jsonlint.com/) JSONLint.com is a tool that we use quite heavily when making changes to the viewer configs. It will show you exactly where the JSON error is. A useful tool for all site admins!

    0
  • Permanently deleted user

    Thank you, Chris. Removing that coma did it. However, it was only part of my problem. I was actually trying to comment out the part of the code instead of deleting it, but the site would not load unless I delete the code. Perhaps, I wasn't using appropriate syntax (/*...*/). 

    Kevin, thank you for the link to JSONLint.com it is handy.

    Nataliya

    0
  • Permanently deleted user

    The contents of the desktop.json.js file are just straight JSON, which does not support the use of comments unfortunately.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.