Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Regular Contributor
Posts: 184
Registered: ‎10-26-2015
Accepted Solution

Default saving credentials when creating a User Map

Hi,

I am looking for a way to default the tick box option shown when saving a User Map in Geospatial Portal so that the "save credentials of connected data sources" option is enabled by default. I noticed this option is ticked by default within the Admin Portal instance and would like the same behaviour in a Geospatial Portal template instance.

 

Is this possible via javascript customisation?

 

Thanks

Colin

Highlighted
Technical Evangelist
Posts: 125
Registered: ‎08-05-2015

Re: Default saving credentials when creating a User Map

Hi Colin,

 

Happy New Year Smiley Happy

 

Please check this code snippet:

https://bitbucket.org/snippets/pszrajbe/BezzGo/geospatial-portal-sdk-default-saving

 

Best regards,

Piotr

Regular Contributor
Posts: 184
Registered: ‎10-26-2015

Re: Default saving credentials when creating a User Map

Happy New Year to you Piotr! Smiley Happy

I've tested this on a Geospatial Portal 2016 EP04 template application and it works.

Thanks for your help.

 

Best regards,

Colin

Regular Contributor
Posts: 184
Registered: ‎10-26-2015

Re: Default saving credentials when creating a User Map

Piotr,

I've discovered that the changes to MapConfig.js to implement this stop Mobile.aspx from loading. The implementation that requires default saving of credentials will be accessed by desktop and tablet/smart phone devices so I need a fix for Mobile.aspx. Can you help please?

 

prototype_error.png

 

Thanks,

Colin

Technical Evangelist
Posts: 125
Registered: ‎08-05-2015

Re: Default saving credentials when creating a User Map

Hi Colin,

 

it won't be a nicest solution but for sure the quickest one. Change this:

 

Sys.Application.add_init(function() {
    // code
});

to this:

 

Sys.Application.add_init(function() {
    try {
        // code
    } catch (e) {
        // nothing to do, no MapStorageControl here
    }
});
Technical Evangelist
Posts: 125
Registered: ‎08-05-2015

Re: Default saving credentials when creating a User Map

I updated the coded snippet

 

https://bitbucket.org/snippets/pszrajbe/BezzGo

 

 

Regular Contributor
Posts: 184
Registered: ‎10-26-2015

Re: Default saving credentials when creating a User Map

Thanks for your help Piotr, Mobile.aspx is now loading.

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.