Hexagon Geospatial
MENU

WebGIS Q&A

WebGIS enables powerful geospatial web applications and services that securely share your organization’s rich geospatial data, and provides tools to deeply examine spatial data and create value added products, on demand.
Showing results for 
Search instead for 
Do you mean 

Disable 3D button Geospatial Portal

by Technical Evangelist on ‎11-15-2016 06:58 PM - edited on ‎05-22-2018 07:59 AM by Technical Evangelist (1,228 Views)

Question

How do you disable the 3D button in Geospatial Portal?

Answer

For versions 2018 and later, it is possible to control this directly using Administration Console by following these steps:

  1. Configure a Geospatial Portal instance
  2. Go to Starting Configuration and expand Advanced options
  3. Uncheck Enabled on "Switching between 2D/3D" option.

For versions 2016 and 2015 EP06+

Add the following to the C:\Program Files\Common Files\Hexagon\Services\Instances\{Instance Name\js\MapConfig.js

 

Sys.Application.add_init(function () {
   Intergraph.WebSolutions.Core.WebClient.Controls.Map.MapControlContainerBase.prototype._refreshNaviToolbar = function(newMapControl) {
        var itemsPanel = Ext.getCmp("fancyItemsPanel"); 
        if (!itemsPanel)
            return;
        var items = itemsPanel.getTopToolbar().items;
        if (newMapControl === "WCMapControl") {
            items.get(0).hide();
            items.get(3).show();
            items.get(5).hide();
            items.get(6).show(); //zoom history
        } else {
            items.get(3).hide();
            items.get(5).show();
            items.get(6).hide();
        }
    }
});

 

 

Comments
by DavBeguin
on ‎01-13-2017 04:46 AM

And for EP04 ? Smiley Happy

by Technical Evangelist
on ‎01-13-2017 05:56 AM

Hi David,

 

For me it worked using this hack Smiley Wink For instance, if you're using Full.aspx, then place this script tag somewhere inside <body ... />

 

<script type="text/javascript" >
     (function(){
          var tId = setInterval(function() {
              if ($(".wc_map_tb_mc_switch").parents("td")) onComplete()
          }, 500);
          function onComplete(){
              clearInterval(tId);    
              $(".wc_map_tb_mc_switch").parents("td").hide();
          };
      })()
</script>  

What it does is basically waiting until the proper control gets rendered and right after that it removes it. Probably not the cleanest solution but works fine. You can probably place this script directly inside any JS file to not obstruct with ASPX content.

 

Jan

by
on ‎07-03-2017 06:41 AM

Jan's solution worked for me - i had to increase the time interval -  the other solutions may have worked if i had increased the time sufficiently.

by
on ‎05-22-2018 05:41 AM

The workaround for 2016 EP04 and 2018 is ok but the time interval has to be tweaked quite a bit to find the right number for client machines. Are there any plans to have a method on the server-side to disable this button?

by Technical Evangelist
on ‎05-22-2018 07:54 AM

This is already a part of the product since 2018 release. You will find it here:

3D.png

 

Contributors