Smart M.App discussions

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Frequent Contributor
Posts: 85
Registered: ‎01-20-2016
Accepted Solution

Send sidebar content to a fixed panel

Hi!

Is there an easy way to put the contents of the sidebar in a fixed panel of my Smart M.App layout?

Any help appreciated

Ruth

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

Re: Send sidebar content to a fixed panel

[ Edited ]

Hi Ruth,

 

I guess this is not probably what you are looking for because this solution just moves the required HTML controls to another DIV element created inside the map panel:

 

$("<div id='legendcopy'></div>").insertAfter("#mainMap");

$("#legendcopy").css({
  'background-color': 'black',
  'height': '400px',
  'left': '25px',
  'opacity': '0.85',
  'position': 'absolute',
  'top': '80px',
  'width': '300px'
}); 

$("#accordion-legend-list").appendTo("#legendcopy");

Untitled.png

 

 

To move the logic to a different panel (like Custom Panel), you would need to set up the HTML controls on your own and replicate all the events that drive map panel content (layer on/off, opacity, layer ordering). Then use message sending mechanism to communicate between the panels.

 

Jan

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Frequent Contributor
Posts: 85
Registered: ‎01-20-2016

Re: Send sidebar content to a fixed panel

Hi Jan,

 

that works perfect and looks nice!

Small note: I had to change #buttonscopy to #legendcopy to give the new div container the proposed style.

 

Thank you so much!

Ruth

 

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

Re: Send sidebar content to a fixed panel

Oh, thanks, I fixed that mistake in the code above. I did a quick naming replacement before placing the code here and forget for this one.

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial