Hi all
I'm beginner in using openMap.
My problem is that I have to read a VPF and extract
information about featurs(such as point polyline and
so on) without starting openMap.
I tryed with tis code:
/***************************************************/
public TryReadVPF()
{
try
{
Properties prop= new Properties();
prop.setProperty("vmapPol.class","com.bbn.openmap.layer.vpf.VPFLayer");
prop.setProperty("vmapPol.prettyName","VMAP
Layer");
prop.setProperty("vmapPol.vpfPath","C:/VPF/VpfItem049/EURNASIA");
prop.setProperty("vmapPol.searchByFeature","true");
prop.setProperty("vmapPol.defaultLayer","vmapCoastline");
prop.setProperty("vmapPol.coverageType","Bnd");
prop.setProperty("vmapPol.featureTypes","edge
area");
prop.setProperty("vmapPol.text","");
prop.setProperty("vmapPol.edge","Polbndl
Coastl");
prop.setProperty("vmapPol.area","Polbnda");
VPFLayer vpfl = new VPFLayer();
vpfl.setProperties("vmapPol",prop);
OMGraphicList gl = vpfl.getRectangle();
Iterator it = gl.iterator();
while (it.hasNext())
{
Object oo = it.next();
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
/****************************************************/
when I invoke the
vpfl.getRectangle();
the program throw an exception:
java.lang.NullPointerException at
com.bbn.openmap.layer.vpf.VPFLayer.getRectangle(Unknown
Source) at
com.marconi.provavpf.TryReadVPF.<init>(TryReadVPF.java:40)
at
com.marconi.provavpf.TryReadVPF.main(TryReadVPF.java:62)
I readed in the FAQ that I have to modify the
openmap.properties ad add
openmap.layers=...vmapPol
IS it mandatory and in this case where do I have to
read the openmap.properties without starting openmap?
Thank you
Stefano Madeddu
______________________________________________________________________
Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il filtro Anti-spam
http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.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 Fri Oct 10 06:11:02 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT