dLegend initilization and license
Steve Lime
Steve.Lime at DNR.STATE.MN.US
Mon Oct 9 09:44:20 PDT 2006
1) Matthew is correct on the library license - a BSD license.
2) My take on legend intialization with applications like dbox was to
initialize the legend at the application level rather than using
settings from the mapfile. dLegend has a method for setting layer state
(changeNodeStatus) which can be called once a legend is initialized.
Typically your application might support passing layers names in from a
URL or via cookie and then you'd use those to initialize the legend
after it exists (in the body onLoad). This works conceptually like the
MapServer CGI were everything is off by default and you explicitly turn
things using layer= and so on. The problem with potentially setting
state in 2 places (e.g. mapfile and URL) is that they may collide.
If you really wanted to support setting layers "on" based on the
mapfile state you'd need to muck with the legend XML generator(s) and
add a "status" attribute and then tweak the javascript in dlegend.js to
recognize that attribute. Let me know if you decide to go there so we
can modify the other language XML generators (perl, PHP and python all
exist).
Steve
>>> Richard Greenwood <richard.greenwood at GMAIL.COM> 10/8/2006 8:16 AM
>>>
Two very general questions about dLegend:
1. It uses the 4 Yahoo Javascript files that say "Copyright (c) 2006
Yahoo! Inc. All rights reserved." So is it legal to use those
Javascript libraries?
2. dLegend does not put a "check" in the active layers when it is
first initialized. I would like to work on that. Has anyone else
looked into that? Can anyone offer any suggestions as to where to
start?
Thanks,
Rich
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
More information about the MapServer-users
mailing list