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
signature.asc
Description: Ceci est une partie de message numériquement signée
