<!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><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>thanks for the suggestions. The walterzom library
is quite impressive. But I'm not sure if it was designed to function in the way
kamap loads, with content being written on-the-fly by
javascript. </FONT><FONT face=Arial size=2>I get the slidebar images to
show in the legend (written out dynamically in kaLegend.js), but they don't
slide. There's no javascript errors, though.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The library seems not to find the objects that get
written dynamically (the slidebar images). I tried placing the javascript
functions to invoke the drag-functionality in different spots. I even wrote out
the javascript dynamically with javascript (that sometimes works), but Firefox
crashed on that.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I better leave it for a day where I have strong
coffee at hand.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jacob</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: 22 June 2005 21:17<BR>To: Jacob
Delfos<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>compress=no should work, I use it all the time for
debugging. <BR>Alternately you can map a web path to the scripts directory and
load <BR>them directly. There is no real need to use getcjs.php other than
to <BR>provide (hopefully) optimal performance.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I've had pretty good luck figuring stuff like this
out. We've been <BR>using wz_dragdrop.js from walterzorn.com and have a
zoom control <BR>working. An opacity slider shouldn't be too much
different.</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>Jacob Delfos wrote:<BR>> Hi Paul,<BR>>
<BR>> I gave it a try, but it's pretty hard. I actually tried to implement
the <BR>> 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><BR>>
<BR>> It looks like a good solution, and it has a "slider stopfunction",
which <BR>> could invoke the setLayerOpacity function.<BR>> <BR>>
Problem I ran into is.... The content of the cells in the legend is <BR>>
written to it dynamically. I'm having a hard time getting the functions <BR>>
of the slider library to write a sliding bar into that legend cell. I <BR>>
assigned an ID to the legendcell, like:<BR>>
<BR>>
td.name=layer_name;<BR>>
td.id=layer_name;<BR>> <BR>> Then I pass the name of the cell into
the function that builds the <BR>> slider, which I modified, to write to the
object of which the name was <BR>> parsed using innerHTML (rather than to
document.write). But it doesn't <BR>> work, and firefox won't tell me why.
It's probably a bit too complex. <BR>> I'm not exactly a DOM expert,
either.<BR>> <BR>> By the way, the getcjs.php functionality makes it
really hard to debug <BR>> (everything occurs on line 1!). Can it have a
parameter that makes it do <BR>> nothing to the .js file, for debugging
purposes? The "compress=no" <BR>> option doesn't seem to do
it....<BR>> <BR>> <BR>> <BR>> <BR>>
-----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>
<<A
href="mailto:ka-map-users@lists.maptools.org">mailto:ka-map-users@lists.maptools.org</A>><BR>>
Subject: Re: [ka-Map-users] Opacity control in legend<BR>> <BR>>
Jacob,<BR>> <BR>> 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.<BR>> <BR>> 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.<BR>> <BR>> 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.<BR>>
<BR>> 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
;)<BR>> <BR>> Cheers<BR>> <BR>> Paul<BR>>
<BR>> 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> <<A
href="mailto:_jacob.delfos@maunsell.com">mailto:_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>
<<A
href="mailto:ka-Map-users@lists.maptools.org">mailto: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><BR>>
<BR>> -- <BR>>
+-----------------------------------------------------------------+<BR>>
|Paul
Spencer
<A href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</A> <BR>>
<<A
href="mailto:pspencer@dmsolutions.ca">mailto: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>>
+-----------------------------------------------------------------+<BR>>
<<A
href="mailto:jacob.delfos@maunsell.com">mailto: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>+-----------------------------------------------------------------+<BR></FONT></DIV></BODY></HTML>