|  | ||||
| 
 | ||||
| [Chameleon] LegendTemplate WidgetRene Teniere TENIERER@gov.ns.caWed, 14 Jan 2004 14:41:02 -0400 
 | ||||
Paul,
Sorry for the e-mails, but the following code seems to work now with
the following changes. Now the legend button is being displayed and the
popup is working fine. 
I hope this will help someone else in the future as well.
Thanks for the help.
Rene
>>> pagameba@magma.ca 2004-01-13 10:36:56 PM >>>
There definitely seems to be something odd here.  These lines of code:
if (strcmp(substr($this->mszTemplate, 0, 1), "/") ||
     strcmp(substr($this->mszTemplate, 1, 1), ":") ||
     strcmp(substr($this->mszTemplate, 0, 1), "\\") )
{
seem to be wrong.  I think that the intention of the block following it
is to calculate the location of the template if a relative path is 
given.  The if doesn't seem to do that.
I think it should say:
if (strcmp(substr($this->mszTemplate, 0, 1), "/") != 0 &&
     strcmp(substr($this->mszTemplate, 1, 1), ":") != 0 &&
     strcmp(substr($this->mszTemplate, 0, 1), "\\") != 0 &&
     strcasecmp(substr($this->mszTemplate, 0, 7), "http://" != 0)
{
and the second if which reads:
if (strtoupper(substr($this->mszTemplate, 0, 7)) == "http://")
{
should read:
if (strtolower(substr($this->mszTemplate, 0, 7)) == "http://")
{
Can you try this and let me know if it works?
Cheers,
Paul
   | 
 This archive was generated by Pipermail. | 
|  MapTools.org -- Hosted by DM Solutions Group  |