/** * Default saving credentials when creating user maps and workspaces * * The code snippet below, when appended to MapConfig.js will check * "Save credentials of connected data sources" by default * * Please note that this code snippet uses internal API and it may not work in future versions * (although it is rather unlikely :)). It has been tested on GSP 2016 SDK EP04 * * 2018-01-04 Piotr Szrajber <piotr.szrajber@hexagongeospatial.com> */Sys.Application.add_init(function(){varmscp=Intergraph.WebSolutions.Core.WebClient.Controls.MapStorageControl.prototype;varorig_showWorkspacesMenu=mscp._showWorkspacesMenu,orig_showWorkspaceMenu=mscp._showWorkspaceMenu,orig_showMapsMenu=mscp._showMapsMenu;// user workspaces checkboxmscp._showWorkspacesMenu=function(icon){orig_showWorkspacesMenu.call(this,icon);this._includeCredentialsWorkspaces.setValue(true);};mscp._showWorkspaceMenu=function(workspace,icon){orig_showWorkspaceMenu.call(this,workspace,icon);this._includeCredentialsWorkspaces.setValue(true);};// user maps checkboxmscp._showMapsMenu=function(icon){orig_showMapsMenu.call(this,icon);this._includeCredentialsMaps.setValue(true);};});
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.