Re: Generating an image from a MapBean without a GUI

From: Donald Dietrick <dietrick@bbn.com>
Date: Thu Sep 06 2001 - 10:31:06 EDT

Hi Paul,

You'll want to check out the
com.bbn.openmap.image.SimpleHttpImageServer, which makes use of the
com.bbn.openmap.image.MapRequestHandler that can create an image of a
map without a JFrame.

FYI, there is the com.bbn.openmap.plugin.shis.SHISPlugIn (SHIS =
SimpleHttpImageServer, get it? :) ) that can talk to the
SimpleHttpImageServer to retrieve images.

Regards,

Don

On Wednesday, September 5, 2001, at 10:46 AM, Paul Chisholm wrote:

> Hi,
>  
> I am building a web server to deliver information, some of which is
> generated by OpenMap. The user profile is such that it is not feasible
> to run an OpenMap applet on the client browser, so I am using OpenMap
> to generate an image that is then sent to the client.
>  
> I store the image in a file with the code
>  
>         SunJPEGFormatter formatter = new SunJPEGFormatter();
>         formatter.setImageQuality(0.8f);
>         byte[] bytes = formatter.getImageFromMapBean(map);
>         FileOutputStream binFile = new FileOutputStream(<filename>);
>         binFile.write(bytes);
>         binFile.close();
>  
> In this context I am not interested in displaying the map bean in a
> Swing JFrame as is usually done, I just want to generate a JPEG from
> the map bean. However, unless I actually display the map bean in a
> JFrame I get a black image. What I currently do on the server is:
>  
>         create map
>         display map in frame
>         generate image file
>         dispose of frame
>  
> Note that its not enough just to create the JFrame, I have to call
> 'frame.setVisible(true)'.
>  
> Is there any way to convert a map bean to an image without creating the
> JFrame?
>  
> Thanks,
> Paul

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Donald F. Dietrick, dietrick@bbn.com
BBN Technologies, 10 Moulton Street, Cambridge, MA 02138
617.873.3031 FAX 2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 Thu Sep 6 10:32:00 2001

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