mapscript perl queryUsingRect fails
Manfred Meier
m.meier at spiekermann.de
Tue Apr 10 07:56:50 PDT 2001
Yes, it helps. Thank you very much. I must confess, that my understanding of the mapservers structure is not very good, but I am
learning. Isn't there somebody who has a bit time to write a book about it??
Stephen Lime schrieb:
> It will set an error, most likely a NOT FOUND error. The msWriteError program would need a bit more wrapping in SWIG it will work.
>
> Anyway, my guess is that there are no queryable layers in the mapfile. To be queryable the layer must be:
>
> - ON/DEFAULT/QUERYONLY in it's STATUS
> - must have at least 1 QUERY object even if you're not going to use it
>
> You can create a dummy query object to satisfy the second condition like this:
>
> QUERY
> TEMPLATE "dummy"
> END
>
> Let me know if that helps.
>
> Steve
>
> >>> "Manfred Meier" <m.meier at spiekermann.de> 04/10/01 03:24 AM >>>
> Hello users,
>
> I'm trying to learn mapscript with perl (mapserver 3.3.011).
> In one of my test programs I try to make a queryUsingRect:
>
> $map = new mapObj ('neuss.map');
> $rect = new rectObj;
> $rect->{minx} = 2530000;
> $rect->{maxx} = 2560000;
> $rect->{miny} = 5660000;
> $rect->{maxy} = 5700000;
> $qobj = $map->queryUsingRect ($rect);
>
> The problem is: $qobj is undef. The $map-Object is ok. I can
> make an image with msSaveImage.
>
> I did hope that I can get an error message with
> mapscript::msWriteError (STDOUT) but there is
> always an runtime error: type error in argument 1 of
> msWriteError: Expected FILEPtr.
>
> Can somebody help me?
>
> Thank you
>
> Manfred Meier
More information about the MapServer-users
mailing list