Bug 679 - [Chameleon - Widget] MapDHTML widget drawmap error
: [Chameleon - Widget] MapDHTML widget drawmap error
Status: RESOLVED FIXED
: Chameleon
Widget
: 1.99
: PC Windows XP
: P2 normal
: 1.99 beta 4
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-09-30 10:45 by
Modified: 2004-12-02 21:31 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-09-30 10:45:42
Paul,
 
Can you tell me what exactly has been changed in drawmap.php? I'm having a few
problems with the latest file (modified Sept 30th). It appears the mapimage
takes on the size of the querymap. I tested this, and changing the querymap size
in my mapfile does in fact change the size of the mapimage. Is it supposed to
work like that? Also, the new drawmap file doesn't seem to take in the nWidth
and nHeight GET variables from the URL. I used to be able to pass them in, which
is handy for changing imagesize on the fly. Also, my legend images do not
appear, because it cannot seem to find the template file (see below), even if I
use an absolute URL. Does it look in a different place? If I replace the
drawmap.php file with the one from June 7th, it all works well again.
 
This is what my PHP log file says if I use the latest version of drawmap:
 
[30-Sep-2004 08:41:51] PHP Warning:  [MapServer Error]:
generateLegendTemplate(): Error while opening template file.
 in C:\chameleon\epra\htdocs\widgets\LegendTemplate\LegendTemplate.widget.php on
line 503
[30-Sep-2004 08:41:51] PHP Warning:  [MapServer Error]: msInsertHashTable:
Invalid hash table or key
 in C:\chameleon\epra\htdocs\widgets\LegendTemplate\LegendTemplate.widget.php on
line 503
[30-Sep-2004 08:41:51] PHP Warning:  [MapServer Error]: msInsertHashTable:
Invalid hash table or key
 in C:\chameleon\epra\htdocs\widgets\LegendTemplate\LegendTemplate.widget.php on
line 503
[30-Sep-2004 08:41:51] PHP Warning:  [MapServer Error]: msInsertHashTable:
Invalid hash table or key
 in C:\chameleon\epra\htdocs\widgets\LegendTemplate\LegendTemplate.widget.php on
line 503
[30-Sep-2004 08:41:51] PHP Warning:  [MapServer Error]: msInsertHashTable:
Invalid hash table or key
regards,
 
Jacob
------- Comment #1 From 2004-09-30 10:48:41 -------
The latest change introduced the capability to have persistent queries.  I found
that I have an un-committed change to drawmap.php that may fix this problem. 
Essentially drawmap.php is currently always using drawQuery but it should only
be using drawQuery if a persistent query was found.

I am not sure what the interaction between draw, drawQuery, and the QueryMap
object is.  I suspect that I should probably modify the QueryMap object
temporarily (at least it's size) before doing a drawQuery.

I will also check the nWidget / nHeight problem.

The LegendTemplate thing is a separate issue unrelated to drawmap I think.
------- Comment #2 From 2004-10-12 22:15:22 -------
if this isn't fixed by beta 3 then we'll need to address it for RC1.  Jacob, did
you try with latest CVS?
------- Comment #3 From 2004-10-12 22:32:03 -------
Yes, I did. Sorry, forgot to mention.
I tested it with the sept 30 version of drawmap. I don't get any PHP errors in
my log, but it still gets the size from the querymap in the mapfile, ignoring
the size of the actual mapobject.
I managed to get my templates to work again, but I have to use an absolute URL
now. I found the previous solution easier, because I don't like hardcoding the
servername (I tend to move sites across laptops and pc's a lot).

It still doesn't get the height and width from the POST variables, but this is
not a major disaster; version 1.0.4 didn't do this by default either, and it's
easy for me to change if I want to.

For some reason, when I update from the CVS, I don't get the folder
/chameleon/htdocs/common at all. I use wincvs, which says:
cvs update -P -d

It happened since the CVS was restructured. I started off with a clean copy.

Jacob
------- Comment #4 From 2004-10-12 22:42:37 -------
Was the drawmap.php file updated since sept 30? If it was, then I did not use
the latest version (sorry, my mistake).
------- Comment #5 From 2004-10-12 22:53:40 -------
Got latest version now after some messing about. ....don't like CVS.....

All is happy; height and width using POST parameters works, templates work,
mapsize no longer coming from querymap size.

Sorry for the overload of messages.
------- Comment #6 From 2004-10-13 07:41:16 -------
no problem :> cvs question replied to via list.