[OpenMap Users] MapRequestHandler.createImage problem

From: Christian Weaves <christian.weaves@fugro-robertson.com>
Date: Fri May 28 2004 - 09:19:49 EDT

Hi, Can someone please tell me how I use the createImage method in the
MapRequestHandler object correctly.

I have a servlet (CreateMapImage.java) that is supposed to generate a
map image using the OpenMap api and send the result to the servlets
response object.

The MapRequestHandler.createImage method accepts a Projection class as a
parameter, I can't for the life of me create a new Projection object to
pass as a parameter..

Can you point me in the right direction??

Thanks very much, here's the Servlet code:

=======================================================================

public void doPost(HttpServletRequest request, HttpServletResponse
response)
    throws ServletException, IOException {

        response.setContentType("image/jpeg");

        MapRequestHandler iServer = new MapRequestHandler(mapProps);

        //some dummy coords
        String imageRequest =
"REQUEST=MAP&PROJTYPE=Mercator&SCALE=180127&WIDTH=770&HEIGHT=540&LAT=64.47185&LON=6.161536";

        OutputStream os = response.getOutputStream();
        
        iServer.handleRequest(imageRequest);
                

        //problem line, can't create image
        os.write( iServer.createImage(***********) );
}
                
                

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri May 28 09:20:55 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT