Hi all,
I'm having some difficulties. What I'd like to do is be able to get an
image of the map, and launch it in a new browser window. (It's actually
slightly more than that, but if I can do that, I can get the rest of the way).
I don't really understand JavaBeans - I think they may be stuffing me up.
I've created my own menu item based on SaveAsImageMenuItem - I have
included its' actionPerformed routine at the end of this email. I've
stripped the standard method, and the current one doesn't do anything, but
I'm still getting security exceptions. Can anyone answer me the following
questions? I have also removed the check to see whether openmap is running
as an Application or an Applet, and am always trying to set the mapHandler
for each menu item regardless.
Do applets have a BeanContext?
Why does my new menu item generate security exceptions?
What I really want to do is be able to print. I was able to find out how to
create permissions files for applets, but I don't want to rely on users to
put it in the right place etc. So, if I can get to the point in openmap
where I have an image of the map, I believe I can use this in conjunction
with javascript to launch the image in a new browser window, which will let
people save it or print it, or even just keep it floating around for
reference. But I can't work out how to generate the image.
-T
public void actionPerformed(ActionEvent ae) {
if(mapHandler == null) { return; }
Iterator it = mapHandler.iterator();
Object someObj;
while(it.hasNext()) {
someObj = it.next();
if(someObj instanceof MapBean) {
System.out.println("got to here");
if(formatter == null){ return; }
byte[] imageBytes = formatter.getImageFromMapBean((MapBean)someObj);
return;
}
}
return;
}
==============================================
This email contains information which may be useful. The views
expressed within may or may not be the views of the author.
==============================================
-Tennessee Leeuwenburg, Silver Stream Pty Ltd
0418 300 881
-- [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 May 31 22:07:25 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT