GEOPoint NumberFormatException

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

GEOPoint NumberFormatException

Postby zahidalinaqvi » Wed Sep 16, 2009 9:41 pm

Hello all,

i am getting the lat and long from the webservice client in String format.

when i m trying to show this coordinates on map its giving Numberformatexception.

Please have a look on attached file and below code.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  //Double lat = 44.7959;
  2.  
  3.         //Double lng = -91.4435;
  4.  
  5.        
  6.  
  7.         //g = new GeoPoint((int) (lat * 1E6),  (int) (lng * 1E6));
  8.  
  9.          //g = new GeoPoint((int) lat,(int)lng);
  10.  
  11.          
  12.  
  13.          Log.e("Zahid string:", coordinates[0] +"::"+ coordinates[1]);
  14.  
  15.          Log.e("Zahid latlng:", lat +"::"+ lng);
  16.  
  17.          Log.e("Zahid int:", lat.intValue() +"::"+ lng.intValue());
  18.  
  19.          
  20.  
  21.          //g = new GeoPoint((int) (lat * 1E6),  (int) (lng * 1E6));
  22.  
  23.          g = new GeoPoint(lat.intValue(), lng.intValue());
  24.  
  25.          
  26.  
  27.        /* }catch(NumberFormatException e) {
  28.  
  29.             Log.e("Zahid Exception : ", e.getMessage());
  30.  
  31.         }*/
Parsed in 0.050 seconds, using GeSHi 1.0.8.4
Attachments
error.PNG
error.PNG (33.37 KiB) Viewed 118 times
User avatar
zahidalinaqvi
Developer
Developer
 
Posts: 35
Joined: Mon Aug 11, 2008 8:54 am
Location: Jaipur India

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 8 guests