wissam114
04-13-2007, 12:39 PM
Hi everybody,
I'm working on a java application using Mappoint and I have a problem with the "findAdressResults" method here is the code i wrote, but I don't know how to retrieve the location result:
FindResults fr;
Integer geousa=new Integer(MNPA83.GeoCountry.geoCountryUnitedStates);
Location objLoc1;
Variant index =new Variant(com.borland.dx.dataset.Variant.INT);
index.setInt(1);
fr=objMap.findAddressResults("359 WABASH AVE","BUFFALO"," ","NY","14217",geousa);
int nbfound=fr.getCount();
objLoc1=(Location)fr.getItem(index);
When I debug the program the variable nbfound=1, but I have an "java.lang.ClassCastException" for the last line of the code.
Please help me to correct the Error if you can,
Thanks in advance.
I'm working on a java application using Mappoint and I have a problem with the "findAdressResults" method here is the code i wrote, but I don't know how to retrieve the location result:
FindResults fr;
Integer geousa=new Integer(MNPA83.GeoCountry.geoCountryUnitedStates);
Location objLoc1;
Variant index =new Variant(com.borland.dx.dataset.Variant.INT);
index.setInt(1);
fr=objMap.findAddressResults("359 WABASH AVE","BUFFALO"," ","NY","14217",geousa);
int nbfound=fr.getCount();
objLoc1=(Location)fr.getItem(index);
When I debug the program the variable nbfound=1, but I have an "java.lang.ClassCastException" for the last line of the code.
Please help me to correct the Error if you can,
Thanks in advance.