[OpenMap Users] Trouble with AreaHandler Object

From: Todd Krokowski <todd_krokowski_at_partech.com>
Date: Tue, 19 Oct 2004 14:09:55 -0400

Hello All,

I am trying to use the AreaHandler object to return the political
boundaries associated with a particular country. I have been using the
API documentation as my guide and as a result have ensured that I am
setting all of my properties correctly. More specifically I am first
creating an AreaShapeLayer and then try to retreive the AreaHandler from
the newly created AreaShapeLayer. When debugging I find that the
Hashtable (in AreaHandler) that stores all the PoliticalArea information
is null. Below is the code I am using to setup and initialize the
AreaHandler. If anyone could shed some light as to why the AreaHandler
isn't functioning properly, I would greatlly appreciate it.

Sample Code:

// Initialize the properties for AreaShapeLayer
Properties props = new Properties();
props.setProperty("layer.shapeFile","data/countries.shp");
props.setProperty("layer.spatialIndex","data/countries.ssx");
props.setProperty("layer.csvFile","data/countries.csv");
props.setProperty("layer.csvFileHasHeader","true");
props.setProperty("layer.keyIndex","1");
props.setProperty("layer.nameIndex", "4");
// Create a new AreaShapeLayer
AreaShapeLayer shapeLayer = new AreaShapeLayer();
// Initialize the layer with the above properties
shapeLayer.setProperties("layer", props);
 
AreaHandler areaHandler=shapeLayer.getAreas();
// Do I need this?
areaHandler.initialize("layer", props);

Regards,
-- 
*Todd Krokowski*
/Software Engineer/
PAR Government Systems Corporation
314 S. Jay St.
Rome, NY 13440
Phone: (315) 339-0491 ext. 490
--
[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 Oct 19 2004 - 14:27:46 EDT

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