Skip to main content

Hide Layer Actions Chevron on layer list

Comments

7 comments

  • Kevin Penner

    I think you might be best off hiding through the use of a CSS rule. The class 'layer-actions' is what you want to hide.

     

    0
  • Permanently deleted user

    Instead of hiding the layer actions, i would like to add addtional layer actions such as metadata, or url links to the layer, also edit symbology.  these were identified gaps in our silverlight to html5 transition analysis. Jeff

     

     

    0
  • Kevin Penner

    Hi Jeff, 

    You can add layer actions already. The Layer Actions are located in the config JSON:

    "id": "LayerActions",               "description": "@language-layer-actions-desc",               "moduleId": "LayerList",               "defaultIconUri": "Resources/Images/Icons/arrow-right-alt-24.png",               "items": [                 {                   "text": "@language-menu-add-a-feature",                   "description": "@language-menu-add-a-feature-desc",                   "iconUri": "Resources/Images/Icons/add-24.png",                   "command": "ShowFeatureTemplatePicker",                   "hideOnDisable": true                 },                 {                   "text": "@language-menu-zoom-to-layer",                   "description": "@language-menu-zoom-to-layer-desc",                   "iconUri": "Resources/Images/Icons/arrow-right-alt-24.png",                   "command": "ZoomToLayerExtent",                   "hideOnDisable": true                 },                 {                   "text": "@language-menu-zoom-to-visible-scale",                   "description": "@language-menu-zoom-to-visible-scale-desc",                   "iconUri": "Resources/Images/Icons/arrow-right-alt-24.png",                   "command": "ZoomToLayerVisibleScale",                   "hideOnDisable": true                 }               ]             },   The canExecute of the command determines the visibility (hence some show for feature layers, and regular layers). The command is passed the layer object when you open the layer actions menu and you'd use that to see if the menu should be shown or not.   Cheers, Kevin
    0
  • Chris Roberts

    Can you use layer actions to link to a metadata link? ie the one created in the Layer Hyperlink in Manager?

    Cheers

    Chris

    0
  • Permanently deleted user
    Kevin - Is the intent to set the display to be hidden within the JavaScript file or the custom desktop CSS?  We have custom workflows for editing that integrate with Cityworks and require a work order.  We need to hide this LayerAction functionality on feature layers (or globally).  

     

     
    0
  • Permanently deleted user
    Hi Kevin,

     

    Could you provide some more instructions on how to hide the 'layer-actions' class in the CSS file? Which CSS file? Can this be done under the site's custom CSS file, and what does the code look like?

     

    Thanks,

     

    Kai
    0
  • Permanently deleted user
    Ok, I figured it out. Navigate to the custom CSS file for the site:

     

    ...\REST Elements\Sites\{your site name}\Viewers\{your viewer name}\VirtualDirectory\Resources\Styles\Custom\Desktop.css

     

    Add this code:

     

    .layer-actions{

     

        display:none

     

    }
    0

Please sign in to leave a comment.