Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 237
Registered: ‎07-20-2010
My Device: Not Specified

how to: get city name from a location object?

[ Edited ]

how to: get city name from a location object?

after I get a gps fix I would likle to find out  what city my user is in, can I get that info direct from the location object with a call to getExtrainfo or other api?

 

Thanks

 

PS or shouldn't I just use :

Landmark[] lm =Locator.reverseGeocode(qc, Locator.CITY) ;
setCity("my city is  "+lm[0].getName());

Developer
Posts: 237
Registered: ‎07-20-2010
My Device: Not Specified

Re: how to: get city name from a location object?

dd but trying the reversegeocoding in the sim throws an error which does not get caught by my block:

 

}catch(Error e){
  if (TMC.getDebug())TMC.writelog("TMC getLocationbyGPS Error reversegeocode ",e);  }catch(Throwable e){
  if (TMC.getDebug())TMC.writelog("TMC getLocationbyGPS Throwable reversegeocode ",e);
                        }

 

Do Error's just not get caught?