My csv settings:
cities.class=com.bbn.openmap.layer.location.LocationLayer
cities.prettyName=Community Names
cities.locationHandlers=csvcities
cities.useDeclutter=true
cities.addToBeanContext=true
cities.declutterMatrix=com.bbn.openmap.layer.DeclutterMatrix
csvcities.class=com.bbn.openmap.layer.location.csv.CSVLocationHandler
csvcities.prettyName=Community Names
csvcities.locationFile=c:\\code\\jsif\\communities_points.csv
csvcities.csvFileHasHeader=true
csvcities.locationColor=FF0000
csvcities.nameColor=008C54
csvcities.showNames=false
csvcities.showLocations=true
csvcities.nameIndex=0
csvcities.latIndex=9
csvcities.lonIndex=8
A sample of the csv file:
COMMUNITY,PARISH,X_COORD,Y_COORD
DISCOVERY BAY,St. Ann,-77.16782,17.77706
ROCKY POINT,Clarendon,-77.19378,17.74827
I get the following exception:
*** ERROR ***
Problem reading entries in c:\code\jsif\communities_points.csv, check your
index settings, first column = 0.
*************
Exception in thread "Thread-18" com.bbn.openmap.util.HandleError:
java.lang.ClassCastException: com.bbn.openmap.util.Tokenizer$3 cannot be
cast to java.lang.String
at
com.bbn.openmap.layer.location.csv.CSVLocationHandler.createData(CSVLocationHandler.java:429)
at
com.bbn.openmap.layer.location.csv.CSVLocationHandler.get(CSVLocationHandler.java:548)
at
com.bbn.openmap.layer.location.LocationLayer.prepare(LocationLayer.java:444)
at
com.bbn.openmap.layer.location.LocationLayer$LocationWorker.construct(LocationLayer.java:176)
at com.bbn.openmap.util.SwingWorker$2.run(SwingWorker.java:127)
at java.lang.Thread.run(Thread.java:619)
-- View this message in context: http://www.nabble.com/CSVLocation-csv-file-load-error...-class-cast-exception-tp23841119p23841119.html Sent from the OpenMap mailing list archive at Nabble.com. -- [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 Tue Jun 2 17:23:32 2009
This archive was generated by hypermail 2.1.8 : Tue Jun 02 2009 - 17:23:32 EDT