Skip to main content

toolbar default open + button default active

Comments

13 comments

  • Permanently deleted user

    I would also like to have the option of displaying the toolbar by default with the HTML5 viewer.  I've been looking through the *.js and *.css files for toolbar visibility settings but haven't found anything that does what I want yet.

     

    0
  • Permanently deleted user

    Hi Steven,

    Thanks for the support. I also first dove into the CSS with no result. Then the javascript code: the toolbar button has a click-event listener pointing to "function (k){var d=c[g.target](k,a,b);return!d?(dojo.stopEvent(k),false):d}" in framework.js. I don't think there is a way to run this function on page load. 

    0
  • Marcus Bodig

    I have another simple solution.  Make a change in the three different configuration files (Desktop.json.js, Handheld.json.js and Tablet.json.js). These are located under the Viewer in VirtualDirectory\Resources\Config\Default.

    Find the map module ("moduleName" : "Map") and change the "onClick" setting.  Change this from "onClick" : "InvokeMapTip " , to "onClick" : "Identify " ,.

    Now the default action of the mapclick is identify.

    0
  • Permanently deleted user

    Thank you all for your replies. At the moment I cannot try the suggestions myself since the viewer is in the testing-phase. After this I will certainly try it, it looks very promising.

    0
  • Permanently deleted user

    I just had a chance to try this.  That's the "visible" setting I was looking for, thanks Jordan!

    Steve

    0
  • Permanently deleted user

    Hi jordan,

    To be able to costomize the layout of the HTML5 viewer the same way we can for the Silverlight would be gratly appreciated.

    Thanks,

    0
  • Permanently deleted user

    I just wanted to follow up on this quickly:

    As of HTML5 Viewer 2.2, you will be able to configure this in Manager, either separately for desktop, tablet and handheld or for all three simultaneously. Under the hood, this configuration uses a new option in the view model, so if you've manually configured this, and you want to configure it Manager in 2.2, you may want set visible to false again in the views so that you don't have this configured in two different places.

    I can't project an exact date for the release of 2.2, but we're targeting the end of the month (alongside Essentials 4.1).

    0
  • Permanently deleted user

    Jordan, thank you for the follow-up. I thought we were currently on version 2.0? Is 2.1 skipped?

    0
  • Permanently deleted user

    I got it working perfectly: I made the changes in the desktop.json.js file, because I like to keep the site specific settings in the same folder. I used Marcus' solution to set the default action for a onClick event. To open the toolbar by default I used Jordan's solution.

    I also tried marshboyd's solution by adding some code to the index.html. This worked well for the ToggleToolbar command, but not for the SetActiveTool command. The latter set the tool as active (highlighted in the toolbar) but it didn't work. As I had an alternate solution I did not pursue on this. 

    Jordan, do the settings in desktop.json.js actually conflict with the 2.2 version or just add some confusion but everything keeps working as expected? Would marshboyd's solution be a better solution for this reason? I'm a bit worried because we have geocortex implemented in a DTAP-street and sometimes software updates go much faster then getting a new configuration through the street. 

     

     
    0
  • Permanently deleted user

    Hi Tjibbe,

    Version 2.1 of the HTML5 and Silverlight Viewers were released on Monday along with Instant Search (see the announcement (http://blog.geocortex.com/2014/03/31/instant-search-is-here/) here ). Note that you don't require these viewers in order to use Instant Search - the 2.0 Viewers also support Instant Search; the 2.1 Viewers just add some enhancements (like pushpins).

    The change in 2.2 will not conflict with the workaround I posted earlier in the thread; in that case, the new (Manager-configured) setting will simply take precedence. I'd recommend only using the new configuration with 2.2 to avoid any potential confusion around having the same thing set in two different places, but that aside, there should be no reason for concern.

    I hope that helps,

    Jordan

    0
  • Permanently deleted user

    I just installed 2.2, updated my existing viewer, configured the toolbar to open by default in Manager, applied my changes and saved my site - the toolbar did not open by default. I even tried creating a brand new viewer and configuring it to open the toolbar by default. It did not open the toolbar by default.

    I checked the Desktop.json.js file and "toolbarOpenByDefault" : true, but

    "views" : [ {

     

                    "id" : "MainToolbarView",

     

                    "viewModelId" : "MainToolbarViewModel",

     

                    "visible" : false,

     

                    "title" : "Main Toolbar",

     

                    "region" : "ToolbarRegion",

     

                    "type" : "geocortex.essentialsHtmlViewer.mapping.modules.toolbar.ToolbarView",

     

                    "markup" : "Mapping/modules/Toolbar/LargeToolbarView.html",

     

                    "configuration" : { }

    When I manually edited visible to true, the toolbar opened by default.

    Is this a bug? What am I missing?

     

    0
  • Permanently deleted user

    I'm experiencing the same issue. The checkbox for Open Toolbar by Default doesn't seem to do anything.

    0
  • Permanently deleted user

    I changted the setting in the json file to "true" as suggested and also tried the checkbox in Manager. My toolbar still refuses to display.  Is there another setting somewhere else?  Any idea when that checkbox will actually work? I'm using the latest version of GE and Html5 viewer 2.2.

    0

Please sign in to leave a comment.