[mapserver-users] Re: mode=tile and MapScript

Mr. Puneet Kishor punk.kish at gmail.com
Sat Sep 10 09:10:49 EDT 2011


knock, knock...

any suggestions on the MapScript syntax for setting `mode=tile&tilemode=gmap&tile={X}+{Y}+{Z}` were X, Y, Z are received as http query params?


On Sep 8, 2011, at 10:23 PM, Mr. Puneet Kishor wrote:

> I am trying out mode=tile as detailed at [http://mapserver.org/output/tile_mode.html], and actually, it works great! Might be able to avoid the pains of WMS completely.
> 
> However, it works great with MapServer CGI. What if I want to use MapScript? In other words, instead of 
> 
>    var urlTemplate = 'http://localhost/cgi-bin/myapp?';
>        urlTemplate += 'layers=layer1 layer2&';
>        urlTemplate += 'mode=tile&';
>        urlTemplate += 'tilemode=gmap&';
>        urlTemplate += 'tile={X}+{Y}+{Z}';
> 
> I have
> 
>    var urlTemplate = 'http://localhost/myapp.cgi?';
>        urlTemplate += 'tile={X}+{Y}+{Z}';
> 
> and I add mode=tile and tilemode=gmap on the server side. My question is -- one, will the above work? and, how do I pass mode=tile and tilemode=gmap and the tile={X}+{Y}+{Z} parameters to the program? I didn't see any MapScript documentation for these parameters. I need to translate a call such as [http://localhost/cgi-bin/myapp?layers=layer1&mode=tile&tilemode=gmap&tile=30+46+7] into a MapScript request.
> 
> Puneet.



More information about the mapserver-users mailing list