[mapserver-users] Adding a proxy/wrapper between the web frontend (openlayers) and mapserver

Adrian Popa adrian_gh.popa at romtelecom.ro
Mon Jun 29 00:09:36 PDT 2009


Hello everyone!

For special reasons (dynamic data) I need to create some sort of 
proxy/wrapper around mapserv (5.2) to permit the dynamic modification of 
the mapfile based on the age of the specific mapfile.
Basically the user will request a mapfile which on most ocasions will be 
generated on the fly (server-side). I would like to feed this mapfile to 
mapserv and return the image to the user in a way it's compatible with 
open layers. The user would see this wapper in a transparent way.

I know how to configure the openlayers part and I know how to generate 
the map file, but I'm not sure how to link my wrapper to mapserver...
How do I call mapserver the same way the web server would call it? I 
think if I call it through a shell, it wouldn't work the same way. I 
don't really want to call shp2img because it's harder to maintain.

The output part should be straightforward - I would just print out what 
mapserver returns - because it should take care of setting content-type 
and sending the image.

Any tips on where I could start?
Thanks!

P.S. I'm writing the wapper in perl and I'm not using the mapserver API 
(but I could if it's necessary)





More information about the MapServer-users mailing list