[mapserver-users] querying in mode=tile

Mr. Puneet Kishor punk.kish at gmail.com
Mon Sep 12 00:03:34 EDT 2011


On Sep 11, 2011, at 10:52 PM, Richard Greenwood wrote:

> On Sun, Sep 11, 2011 at 9:37 PM, Mr. Puneet Kishor <punk.kish at gmail.com> wrote:
> 
>> However, since I am not using MapScript (even though I would prefer to), I would have to implement both CGI and MapScript to do what you are suggesting above -- CGI to display the map and MapScript to do the query.
> 
> But my point was that you can do the query without mapserver at all if
> the data is in postgis. Use a server-side language such as Perl or PHP
> to pass the request to postgis, which can do a spatial query, and then
> Perl or PHP can format the result as JSON and return it to the page
> (via AJAX).


On second reading, I now get what you are saying. Strange that it never occurred to me. Sounds very sensible, and I will implement it tomorrow. That way I can get away from CGI `mode=query` and its TEMPLATE-ing vagaries. Yes, my data are in Pg, so I can do all my querying with Perl.

Wish I could do away with `mode=tile` and also get tiles back via MapScript. Then my solution would be complete.

Thanks for this really useful hint (more like making me see the obvious that I was missing for some reason).

Puneet.


More information about the mapserver-users mailing list