[Chameleon] legend template widget scrollbar
Paul Spencer
pspencer at dmsolutions.ca
Wed Nov 17 16:44:11 EST 2004
Jennifer,
this would look something like:
<html>
<head>
<!-- whatever goes in here -->
</head>
<style>
#mapLegend {
width: 200px;
height: 300px;
overflow: scroll;
}
</style>
<body onload="CWC2OnLoadFunction()">
<div id="mapLegend">
<table>
<cwc2 type="LegendTemplate" .../>
</table>
</div>
</body>
The use of a <table>...</table> around the LegendTemplate widget depends
on the contents of the legend template itself. The one with the samples
outputs every layer inside <tr>...</tr> tags. You could choose a
different html representation that didn't use a table.
Also, using #mapLegend means that you MUST give your div an id of
"mapLegend". It is very important that the two match in this
particular case (there are other ways of applying css styles but I won't
add to the confusion by trying to describe them.)
Cheers,
Paul
Jennifer Zeisloft wrote:
> Greetings All-
>
> I am attempting to add a scroll bar to the legend, which is built with
> the legend template widget. The legend used for the GoMMap maps is
> very similar to what I am trying to implement.
>
> http://www.gommap.org/cwc2/cwc2.php?service=VCG&request=GetApplication&version=0.1.0&LANGUAGES=en-CA&TEMPLATES=http://dev.gommap.org/gommap/viewer.html&CONTEXTS=http://dev.gommap.org/gommap/contexts/viewer/realtime_ocean_obs.xml
>
> I have very little experience with html, php, etc. A friend of mine
> suggested that I ask the following (to be honest, I'm not really sure
> what the question means - but it sounds like he could help me if he
> knew the answers):
>
> I could make the legend scrollable by adding a div around the legend,
> and a simple css tag:
>
> #mapLegend { width: 200px; height: 300px; overflow: scroll; }
>
> But where do i put my opening/closeing <div id="mapLegend"></div> tags?
>
> And where do i put the css snippet?
>
> I am extremely grateful for all of the help that has been given in the
> past and for any help you can offer now!
>
> Jennifer Zeisloft
> (UW-Sea Grant)
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
--
Cheers,
Paul
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+
More information about the Chameleon
mailing list