[Mapserver-users] querymap object in php/mapscript

Joukje de Haan joukje.de.haan at aris.nl
Fri May 28 05:42:46 EDT 2004

Daniel Morissette wrote:
> Joukje de Haan wrote:
>> Hello,
>> I'd like to change the size of the querymap object using php. I can't 
>> find any info on the querymap object in the class reference. So I 
>> tried something like this:
>> $qmap = $map->querymap;
>> $qmap->width = 200;
>> $qmap->height = 150;
>> It doesn't give me any errors, but it doesn't have any effect either ;-)
>> $map->drawQuery still returns an image of the size as it is written in 
>> the mapfile. Am I missing something?
> You have to use the set() method to set any class member variables in 
> PHP MapScript:
>   $qmap->set("width", 200);
>   $qmap->set("height", 150);
> Daniel

Sorry, forgot to tell that I tried that too. It gives the following error:

   Fatal error: Call to a member function on a non-object

The non-object seems to be $qmap

If $qmap isn't an object, I would think that $map->querymap gives an error 
(something like "querymap is not a member of the $map object).

Any further ideas?


More information about the mapserver-users mailing list