Hi Jeroen,
Try using an ImageIcon instead of the Image and ImageIO. It will
handle the image download properly, automatically handing the
ImageProducer/ImageConsumer interaction.
- Don
On Sep 14, 2004, at 10:22 AM, Jeroen Meijer wrote:
> 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();
>
> omg2.generate(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
>
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Oct 13 2004 - 11:49:04 EDT