[OpenMap Users] Location Layer & CSVLocationHandler Class Usage

From: Luke A. Catania \(TEC\) <lcatania@tec.army.mil>
Date: Sun Jan 26 2003 - 23:51:22 EST

I am trying to use the two classes in some code I am developing hand get the
message:

*** ERROR ***
Failed to locate property
"C:/CrrelView/Climatology/Data/CSVLocationHandler.class"
Skipping handler "C:/CrrelView/Climatology/Data/CSVLocationHandler"

Or
*** ERROR ***
No property "locationHandlers" found in application properties.

In the first message appears when I have the lines below uncommented and the
second message appears when the line is commented. I guess I am not sure
how to use Location Handlers in the code. I thought I could just
instantiate it and use setLocationHandlers method for the Location Layer,
but it does not seem to recognize it.

My main app contains:
        Properties climatologyStationLocationLayerProps = new Properties();
        climatologyStationLocationLayerProps.put("prettyName", "Climatology
Station Location Layer");
// climatologyStationLocationLayerProps.put("locationHandlers",
"com.bbn.openmap.layer.location.csv.CSVLocationHandler");
        climatologyStationLocationLayerProps.put("useDeclutter", "false");
        climatologyStationLocationLayerProps.put("declutterMatrix",
"com.bbn.openmap.layer.DeclutterMatrix");

        Properties climatologyStationLocationLayerHandlerProps = new
Properties();
        climatologyStationLocationLayerHandlerProps.put("prettyName",
"Climatology Station Location Layer");
        climatologyStationLocationLayerHandlerProps.put("locationFile",
"C:/CrrelView/Climatology/Data/cities.csv");
        climatologyStationLocationLayerHandlerProps.put("csvFileHasHeader",
"true");
        climatologyStationLocationLayerHandlerProps.put("locationColor",
"FF0000");
        climatologyStationLocationLayerHandlerProps.put("nameColor",
"008C54");
        climatologyStationLocationLayerHandlerProps.put("showNames",
"false");
        climatologyStationLocationLayerHandlerProps.put("showLocations",
"true");
        climatologyStationLocationLayerHandlerProps.put("nameIndex", "0");
        climatologyStationLocationLayerHandlerProps.put("latIndex", "5");
        climatologyStationLocationLayerHandlerProps.put("lonIndex", "4");
        climatologyStationLocationLayerHandlerProps.put("csvFileHasHeader",
"true");

        LocationLayer climatologyStationLocationLayer = new LocationLayer();

climatologyStationLocationLayer.setProperties(climatologyStationLocationLaye
rProps);
        CSVLocationHandler[] climatologyStationCSVLocationHandler = {new
CSVLocationHandler()};

climatologyStationCSVLocationHandler[0].setProperties(climatologyStationLoca
tionLayerHandlerProps);

climatologyStationLocationLayer.setLocationHandlers(climatologyStationCSVLoc
ationHandler);
        mapHandler.add(climatologyStationLocationLayer);

Thanks,
Luke

--
[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 Sun Jan 26 23:59:11 2003

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