Re: [OpenMap Users] Proper data path value for the PNGSymbolImageMaker class

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Tue, 30 Nov 2010 19:39:06 -0500

Hi Carr,

I generally use the SymbolReferenceLibrary to create an ImageIcon for
a given code. Take a look at the com.bbn.openmap.layer.DemoLayer for
an example of this, around line 386.

You should be able to make a SymbolReferenceLibrary with the image
maker you want, and then just ask it for the symbol using the code you
are using. If you have the symbol jar file in the classpath, it
should just work.

Hope this helps,

Don

On Tue, Nov 30, 2010 at 5:01 PM, Onstott, Carr CIV NAVSEA KPWA
<carr.onstott_at_navy.mil> wrote:
> I'm trying to use the PNGSymbolImageMaker class to produce MilStd2525 icons based off of the .png files that are provided as part of the milStd2525_png.jar file and have been unable to figure out the proper data path value to use to get it to read the icons directly out of the .jar file. I've exploded the contents of the jar file to a directory and set that directory as the data path and the icons loaded properly, but I can't seem to get the right data path to get them to load out of the jar file directly. Can someone help me with this? Here is the sample code I'm using:
>
> String DATA_PATH = "/OpenMap/openmap-4.6.5/lib/milStd2525_png.jar!";
> String DEFAULT_SIDC = "suzp-----------";
> BasicSymbolImageMaker imageMaker = new PNGSymbolImageMaker(DATA_PATH);
> ImageIcon icon = imageMaker.getIcon(DEFAULT_SIDC, ICON_DIMENSION);
>
> The returned icon is always null. What value do I need to set for DATA_PATH for this to work?
>
>  Carr Onstott
>  ITARS Software Development Lead
>  carr.onstott_at_navy.mil
>  360.315.3390
>
> --
> [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"]
>

--
[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 Nov 30 2010 - 19:39:43 EST

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