[Chameleon] Splitting up a Legend widget

Delfos, Jacob jacob.delfos at maunsell.com
Mon Dec 5 01:42:01 EST 2005


I had similar problems, in that some of our sites have >30 layers,
killing the page layout. Leaving layers out wasn't an option. I solved
this by placing the legend in a scrollable DIV. By placing an
"UpdateMap" button at the top and the bottom of the legend (before and
after legendTemplate widget), it stays quite straightforward to operate.

To do this, the legend must be in a DIV with a style something like

#legendTemplateDiv {
  position: relative;
  width: 170px;
  height: 300px;
  border: 1px solid #000000;
  overflow: auto; // this causes the scrolling

I actually set the cellpadding and cellspacing to be smaller, in my case

This may be more straightforward and intuitive to the user than breaking
your legend up.




	From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Peter
	Sent: 4 December 2005 22:25
	To: chameleon at lists.maptools.org
	Subject: [Chameleon] Splitting up a Legend widget
	Hi all,
	I have a mapserver whose LegendTemplate widget is currently
displaying enough layers to require a user to vertically scroll farther
than I would like.
	I am researching a method of dividing the legend up into two
halves, such that one half is displayed on either side of the MapDTML
widget which is in the center of my site.
	Is there a means of accomplishing this?
	Best regards,
	- Peter

More information about the Chameleon mailing list