PHP/MapScript msQueryByPoint
Didrik Pinte
dpinte at ITAE.BE
Tue May 9 06:10:29 PDT 2006
Le mardi 09 mai 2006 à 03:43 -0700, DjwStone a écrit :
> I'm trying to emulate in PHP/MapScript something I did recently in MapServer
> CGI. I display a PostGIS layer of points, then click a point to display a
> template containing non-spatial attributes of the point from the PostGIS
> table.
>
> I'm assuming I need to call msQueryByPoint in the PHP equivalent, passing it
> the geo coordinates of the clicked point. But then what? It's not clear to
> me how the success of the query (i.e. I don't get 'No matching records...')
> can be used.
>
> Has anyone some sample code showing this sort of thing?
>
> TIA,
>
> Dave
I'm not a php expert but have some insights about the python mapscript.
So here is my answer ;-)
queryByPoint returns a MS_SUCCESS in case of a query giving results and
MS_FAILURE otherwise. You can't have much details about the failure : is
it an empty query ? or a bad formatted query ?
If MS_SUCCESS, you can access the resultset using layer.getResults()
Didrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message num?riquement sign?e
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060509/f73d3fb6/attachment.sig>
More information about the MapServer-users
mailing list