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
-- [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 Wed Sep 5 20:52:51 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT