Everything Java Apache Geospatial Open Source. Hello Shinning Stars!!! Vincent Massol, Raphael Luta, Santiago Gala, Carsten Z.

Tuesday, October 25, 2005

I am going to write a MapServer portlet. The mapserv cgi script can be used on the command line like this.

./mapserv QUERY_STRING="layer=Citylimits&layer=Citywards&zoomdir=1&zoomsize=2&map=%2Fms4w%2FApache%2Fhtdocs%2Fmap%2FMorganCo.map&program=%2Fcgi-bin%2Fmapserv&root=%2Fmap&map_web_imagepath=%2Ftmp%2F&map_web_imageurl=%2Fmap%2Ftmp%2F&map_web_template=map.html"

The parameter program will be replaced by a servlet mapping. Therefore all request to the url, /browse/map, will be redirected to the mapserver.

The template will have all
tags removed so that it is an html page fragment.

A MapServerPortlet class will implement the doView method and encapsulate the mapserv binary execution. The portlet requires the following settings, the location of the mapserv binary, the location of the map file, the initial layer to display, the template to use, the absolute uri to the servlet mapping, the temporary image directory, the temporary image uri, the zoom mode, the zoom value.

A Jetspeed bridge is required. It is based on the Perl bridge which was too busy for the mapserver needs, so I just adapted it to the simplicity of mapserver.

No comments: