[Mapserver-users] Problems with querybypoint/phpmapscript

Andreas Hirner andreas_hirner at hotmail.com
Mon May 19 05:48:03 EDT 2003


Hello,

I am afraid if my question did not contain enough information. I was under 
the impression that the previous  mailings appended to this one contained 
all the necessary details.

However I was able to solve the problem on my own. The answer is quite 
simple: The status of the layer has to be set to "on" in order for 
queryByPoint()/queryByRect() to obtain any results.

Thanks

Andreas

>Hi
>
>You need to send more information if you expect a good
>answer. A well thought out question gives a well thought
>out answer on this list.
>
>Cheers
>
>--- Andreas Hirner <andreas_hirner at hotmail.com> wrote:
> > Hello List,
> >
> > >Could you forward your .map and code to the list?  What
> > MS version are
> > >you using?
> >
> > Here is the layer definition in the map file:
> >
> > LAYER
> >   NAME "tknetz"
> >   DATA "tknetz"
> >   TYPE POLYGON
> >   STATUS OFF
> >   TEMPLATE "dummy.html"
> >   CLASS
> >     NAME "Netz"
> >     OUTLINECOLOR 0 0 0
> >   END
> >   TOLERANCE 5
> > END # tknetz
> >
> > And this is the php script:
> >
> > $extent = ms_newRectObj();
> >
>$extent->setextent($this->extentCurrent[0],$this->extentCurrent[1],$this->extentCurrent[2],$this->extentCurrent[3]);
> > $this->map->queryByRect($extent);
> >
> > The extentCurrent[] array contains the correct values.
> > The error message
> > always states that the query did not return any results.
> >
> >
> > >-----Original Message-----
> > >From: Andreas Hirner [mailto:andreas_hirner at hotmail.com]
> > >Sent: Thursday, May 15, 2003 5:01 AM
> > >To: mapserver-users at lists.gis.umn.edu
> > >Subject: [Mapserver-users] Problems with
> > querybypoint/phpmapscript
> > >
> > >Hello List,
> > >
> > >I wrote a function using querybypoint()/querybyrect()
> > that queries shape
> > >
> > >files. This function works well on  all the layers of
> > the Itasca demo
> > >data
> > >set. Now I tried to get it working with another data
> > set, but the query
> > >does
> > >not return any results. However:
> > >
> > >The layer does have a template and a class section in
> > the map file.
> > >The layer can be queried using Esri's Arc Explorer.
> > >The layer also renders correctly according to the
> > instructions in the
> > >map
> > >file.
> > >
> > >What am I missing?
> > >
> > >Thanks
> > >Andreas Hirner
> > >
> >
> >_________________________________________________________________
> > >Protect your PC - get McAfee.com VirusScan Online
> >
> >http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> > >
> > >_______________________________________________
> > >Mapserver-users mailing list
> > >Mapserver-users at lists.gis.umn.edu
> >
> >http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
> >
>_________________________________________________________________
> > Tired of spam? Get advanced junk mail protection with MSN
> > 8.
> > http://join.msn.com/?page=features/junkmail
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>http://search.yahoo.com

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus




More information about the mapserver-users mailing list