Re: [OpenMap Users] Re: OpenMap Locking Layer position?

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Mon, 25 Oct 2010 23:41:04 -0400

Hi John,

The first thing that comes to mind is to add the base location to the
classpath of the application, and then in the properties file make the
paths to the data files a relative path from that path specified in
the classpath.

Off-hand, I can't think of another option that'll work with the code
as-is. You can extend each layer class that you want to key off that
primary source directory\(GeoDatLoc=C:/Geodata) and then prepend that
to that path property in an extended Layer class setProperties(...)
method before calling super.setProperties(...). Let me know if you
need an example.

I just thought of something about the first option - there's a new
class com.bbn.openmap.util.ClasspathHacker in the beta version, that
allows you to add a URL to the jvm classpath. If you design a
component that takes some property specified as a path to be added to
the classpath, then you can add your (GeoDatLoc=C:/Geodata) property
for that component, and then other relative paths in the openmap
layers would work without any further code modifications.

Hope this helps,

Don





On Mon, Oct 25, 2010 at 7:51 PM, PEARSON, JOHN T JR USAF ACC 453
EWS/EWA <john.pearson.2_at_us.af.mil> wrote:
> Hi Don & List -
>
> Is there a way to use aliases or "environmental variable" within the
> properties file?
>
> For example..
>
> I have multiple machines where the location of my geodata may be on one of
> 2 different drives, "C:/geodata", or "D:/geodata".
> I'd like to define an alias Geodataloc, something along the lines of
>
> GeoDatLoc=C:/Geodata
>
> Is this possible, and can someone explain how...
>
>
> Thanks
>
>
> John T. Pearson, Jr.  IA-04, DAF
> Senior RF Systems Analysis & Modsim Engineer
> 453 EWS/EWA (USAF/ACC/USAFWC/53WG/53EWG)
> john.pearson.2_at_us.af.mil
> (210) 977-5580
>
>

--
[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 Mon Oct 25 2010 - 23:42:25 EDT

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