if(map_field[i]==field){
dealersObj=(WebCardDealersObject)data.elementAt(i);
double lat=Double.parseDouble(dealersObj.getLatitude());
double lang=Double.parseDouble(dealersObj.getLangitude());
String str=dealersObj.getdealersTitle().toString();
//dealersObj=(WebCardDealersObject)data.elementAt(i);
//UiApplication.getUiApplication().pushScreen(new MapForBankLocation(dealersObj.getLatitude(),dealersObj.getLangitude())); }
String document = "<lbs>" + "<location x='"+lat+"' y='"+lang+"' label='"+str+", ON'/>"+"</lbs>";
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT, document));
}
我在Blackberry模拟器中运行此命令,然后显示四次:
nullPointerException
。接下来,它在MAP中不显示任何数据。
最佳答案
我猜dealersObj
是null
。您是否已验证您正在那里获得期望值?