<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1498" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi Paul,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I gave it a try, but it's pretty hard. I actually
tried to implement the sliding bar solution on <BR><A
href="http://www.howtocreate.co.uk/jslibs/otherdemo.html#scc">http://www.howtocreate.co.uk/jslibs/otherdemo.html#scc</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>It looks like a good solution, and it has a "slider
stopfunction", which could invoke the <FONT size=2>setLayerOpacity
function.</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Problem I ran into is.... The content of the cells
in the legend is written to it dynamically. I'm having a hard time getting the
functions of the slider library to write a sliding bar into that legend cell. I
assigned an ID to the legendcell, like:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
td.name=layer_name;<BR>
td.id=layer_name;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Then I pass the name of the cell into the function
that builds the slider, which I modified, to write to the object of which the
name was parsed using innerHTML (rather than to document.write). But it doesn't
work, and firefox won't tell me why. It's probably a bit too complex. I'm not
exactly a DOM expert, either. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>By the way, the getcjs.php functionality makes it
really hard to debug (everything occurs on line 1!). Can it have a parameter
that makes it do nothing to the .js file, for debugging purposes? The
"compress=no" option doesn't seem to do it....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-----Original Message-----<BR>From: Paul Spencer
[mailto:pspencer@dmsolutions.ca] <BR>Sent: 15 June 2005 20:32<BR>To: Delfos,
Jacob<BR>Cc: <A
href="mailto:ka-map-users@lists.maptools.org">ka-map-users@lists.maptools.org</A><BR>Subject:
Re: [ka-Map-users] Opacity control in legend</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Jacob,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I've actually changed the CVS version to use a
legend that is built <BR>entirely on the client side (it looks and works the
same but is much <BR>better performance so far). In the process, I took
out the opacity <BR>control from the layers in the legend because I don't think
this is a <BR>generally useful function ... in its place, I've set it up to read
<BR>opacity from the metadata of the first layer in each group and use that
<BR>to set the opacity of each group of layers.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>It would be reasonably easy to modify kaLegend.js
to add back in some <BR>form of layer opacity control. Ideally, it would
be some sort of slider <BR>I guess ... I've played around with the Walter
Zorn libraries for <BR>drawing and dragging, they work well.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>If you have a real need for this, you could
probably add an opacity <BR>control reasonably easily by modifying kaLegend.js
to build the <BR>additional images and event handlers to replicate the original
way that <BR>I had implemented this.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I may have time to add some sort of sliding opacity
controller as an <BR>option while at MUM3 ... in between a few beers, I suspect
;)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Cheers</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Paul</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Delfos, Jacob wrote:<BR>> Hi all,<BR>>
<BR>> I'm trying to put together a site that makes use of the opacity setting
<BR>> in the legend, but it seems that the CVS version is not configured to
<BR>> make use if it by default. I'm having some trouble figuring out how it
<BR>> all fits together. The transparency sits in legend_template.php, which
<BR>> uses legend_template.html. But how do I get the site to use it? I tried
<BR>> modifying kaLegend.js, but that didn't do the trick.<BR>> <BR>>
Paul.... How did you do it? :)<BR>> <BR>> Regards,<BR>> <BR>>
Jacob<BR>> <BR>> <BR>> *JACOB DELFOS<BR>> SPATIAL INFORMATION
ANALYST<BR>> *Maunsell Australia Pty Ltd<BR>> 629 Newcastle Street,
Leederville, WA 6007<BR>> PO Box 81, Leederville, WA 6902<BR>> Western
Australia<BR>> ABN 20 093 846 925<BR>> <BR>>
Tel + 61 8 9281 6185<BR>> Fax + 61
8 9281 6297<BR>> <A
href="mailto:_jacob.delfos@maunsell.com">_jacob.delfos@maunsell.com</A>_<BR>>
<BR>> <BR>>
------------------------------------------------------------------------<BR>>
<BR>> _______________________________________________<BR>> ka-Map-users
mailing list<BR>> <A
href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org</A><BR>>
<A
href="http://lists.maptools.org/mailman/listinfo/ka-map-users">http://lists.maptools.org/mailman/listinfo/ka-map-users</A></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>--
<BR>+-----------------------------------------------------------------+<BR>|Paul
Spencer
<A href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</A>
|<BR>+-----------------------------------------------------------------+<BR>|Applications
& Software
Development
|<BR>|DM Solutions Group
Inc
<A
href="http://www.dmsolutions.ca/">http://www.dmsolutions.ca/</A>|<BR>+-----------------------------------------------------------------+</FONT></DIV>
<DIV><FONT face=Arial size=2><A
href="mailto:jacob.delfos@maunsell.com"></A></FONT> </DIV></BODY></HTML>