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
mp
Contributor
Posts: 33
Registered: ‎05-30-2016

Customising legend item options menu

[ Edited ]

For our current Geospatial Portal project, using Portal SDK, we need to be able to manipulate/customise the options menu for layers in the legend.

 

Currently the customer is not keen on the way the "Layers" tab arranges the layers, but at the same time the "Categories" tab options menu, for each layer, lacks the "Translucency" option.

I can't seem to find any suggestions that the option menu can be manipulated via the API or any examples on how to do it via customising files.

In short terms, what we need is to:

 

  1. Be able to add e.g. translucency to the legend item options menu in categories tab.
  2. Be able to hide unused legend item options menu items.

Could you please advice us on how we can achieve this?

Technical Evangelist
Posts: 1,106
Registered: ‎09-11-2015

Re: Customising legend item options menu

[ Edited ]

Hi Mikkel, have a look here:

http://community.hexagongeospatial.com/t5/Developers-Knowledge-Base/Context-Menu-Plugin/ta-p/450

 

You will probably need to utilize some control from ExtJS to display the transparency bar, or just make simpler version of it. The legend entry opacity is controled by LegendItem.set_opacity(value)

 

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

mp
Contributor
Posts: 33
Registered: ‎05-30-2016

Re: Customising legend item options menu

I have taken a look at the examples - thank you. However, one requirement is that this functionality would have to (or at least preferred to) be done without building/rebuilding sources as the current solution is "straight out of the box" only using the API from the SDK.

Is there a way around the serverside controls for the context menu? Are there any events that we could take advantage of, to override the default context menu being opened - so that we could show our own custom ExtJS menu?

 

Thanks.

 

 

P.S. Why is the transparency bar not present in the categories tab in the first place? Seems like it is the only one missing, comparing to the layers tab. It is also missing for analysis layers.

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