Re: [OpenMap Users] Problem with rendering icons

From: Don Dietrick <dietrick_at_bbn.com>
Date: Tue, 29 Jan 2008 18:34:56 -0500

Hi Ted,

On Jan 29, 2008, at 6:30 AM, Ted wrote:

> Hi,
>
> I've followed up on the issues. I don't know if the gif file is
> properly defined or the code is broken.
>
> I've traced the problem to:
>
> OMRaster(float lt, float ln, image ii)
>
> lt = 0 //lat
> ln = 0 //lon
> ii = data/icons/airport.gif // from the openmap.properties file.

I don't understand what ii is - is it a string, or a loaded Image? It
should be a java.awt.Image file, which you can get from an ImageIcon
created from a file name.


>
> Then, an exception is thrown:
> OMRasterObject.render: Attempting to draw a image that is not ready:
> Image probably wasn't
> available.
>
> I believe that this exception is a check based on the dimensions of
> the gif/image.

It's a result of the image not being loaded.

Make sure the parent directory of the data directory is in the
classpath, or else the file won't be found with the relative classspath.

Do you get different results with an absolute file path?

- Don


>
> OMRaster appears again in an attempt to render with values:
>
> 0.0
> 0.0
> sun.awt.image.ToolkitImage_at_129e5e9
>
> Further in the procressing:
> OMRasterObject is called to render the gif in pixel coordinates.
>
> public void render(graphics g)
> g=g.drawimage(bitmap, point1.x, point1.y, this);
>
> public abstract boolean drawimage( image img, int x, int y,
> imageobserver observer) ic called.
>
> Then, the message appears:
> Then, an exception is thrown:
> OMRasterObject.render: Attempting to draw a image that is not ready:
> Image probably wasn't
> available.
>
> Has anyone seen this problem or know of a solution? If so, I would
> appreciate a post.
>
> Thanks,
>
> Ted
> -----Original Message-----
> From: owner-openmap-users_at_bbn.com [mailto:owner-openmap-
> users_at_bbn.com]On Behalf Of theodore.wong_at_comcast.net
> Sent: Monday, January 28, 2008 12:39 PM
> To: openmap-users_at_bbn.com
> Subject: [OpenMap Users] Problem with rendering icons
>
> Hi,
>
> I'm tying to mysql with gis extensions and having difficult
> rendering the gif file - airport -
> that I choose for testing. I've put output statements to trace
> where it fails. In MysqlGeometryLayer, the query statement with the
> polygon of the rectangle returns the
> correct set of records but it never renders.
>
> In the openmap.properties file, I've setup:
>
> mygeo.pointSymbol=data/icons/airport.gif
>
> The three lines below were left blank, I didn't find examples for the
> color, width and fill. So, I left them blank.
> mygeo.lineColor=&ltColor for lines&gtDefault is red
> mygeo.lineWidth=&ltPixel width of lines&gtDefault is 0
> mygeo.fillColor=&ltColor of fill&gtDefault is red
> Could this be causing the problem?
>
> Also, I would like to use the
> "com.bbn.openmap.tools.symbology.milStd2525".
> It appears that I can insert the symbology file name into mysql db
> and over ride
> the default mygeo.pointSymbol=data/icons/airport.gif. Is the the
> correct approach?
>
>
> Thanks,
>
> Ted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Tue Jan 29 2008 - 18:36:21 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:08 EDT