RE: [OpenMap Users] Problems with OMRasterObject

From: Jeroen Meijer <jeroenmeijer8931@hotmail.com>
Date: Sun Sep 19 2004 - 02:53:14 EDT

I'm still getting the same error message using mysql layer whatever I do
.
 
 
  ImageIcon ii = new ImageIcon(somePath);
         int h = ii.getIconHeight(); // shows height = 20
         int w = ii.getIconWidth(); // shows width = 100
         bg.setImageIcon(ii); // setup
 
 
Do I have to setup a RawDataRecordSet similar to DBLocationLayer? I'm
running out of options right now...
Could someone help me PLEASE
 
-----Oorspronkelijk bericht-----
Van: owner-openmap-users@bbn.com [mailto:owner-openmap-users@bbn.com]
Namens Jeroen Meijer
Verzonden: woensdag 15 september 2004 11:47
Aan: openmap-users@bbn.com
CC: openmap-users@bbn.com
Onderwerp: RE: [OpenMap Users] Problems with OMRasterObject
 
I've also tried with ImageIcon
 
ImageIcon bgImage = new ImageIcon(new URL(serverURL +
"/images/btn_high.jpg"));
 
 
. but it still fails.. maybe OMGraphic doesn't support JPEG? The
requested file IS available
 
 
-----Oorspronkelijk bericht-----
Van: owner-openmap-users@bbn.com [mailto:owner-openmap-users@bbn.com]
Namens Jeroen Meijer
Verzonden: dinsdag 14 september 2004 16:22
Aan: openmap-users@bbn.com
Onderwerp: [OpenMap Users] Problems with OMRasterObject
 
Hi all, i'm trying to add an image to an OMGraphicList.. The image
itself is loaded, but when rendering the items in the graphic list I get
the message;
 
OMRasterObject.render: Attempting to draw a Image that is not ready!
Image probably wasn't available.
 
 
// test
OMGraphic omg2 = createImage();
omg2generate(proj);
graphics.add(omg2); // OMGraphicList
 
protected OMGraphic createImage(){
      OMRaster bg = null;
      try{
        java.awt.Image bgImage = ImageIO.read(new URL(serverURL +
"/images/btn_high.jpg"));
        bg = new OMRaster(10.0f,10.0f,bgImage);
      }catch(Exception ex){}
      
      
      return bg;
    }
 
What's wrong? I've searched the mailing archives for an answer, but
found none. Maybe the location layer can be used, but then I have to
rewrite all my code which I integrated into a mysql
layer.
 
Regards,
 
Jeroen Meijer
 

--
[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 Mon Oct 18 02:58:47 2004

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