Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - extracting lat/log from mylocation

extracting lat/log from mylocation

Put your problem here if it does not fit any of the other categories.

extracting lat/log from mylocation

Postby eee333 » Tue Mar 25, 2008 10:41 pm

Greetings!

Great Site! I have learned so much here already.

I am using LocationManager to fetch some gps coordinates, like so:

myLocation = myLocationManager.getCurrentLocation("gps");

Which is great, and gives me:

Location[mProvider=gps,mTime=1206474488897,mLatitude=37.4562797192957,mLongitude=-122.13319160860807,mHasAltitude=false,mAltitude=0.0,mHasBearing=true,mBearing=306.12,mHasSpeed=true,mSpeed=14.425023,mExtras=null]

How can I extract the lat and log variables out of this (hopefully without having to do any regex).

Thanks for the help!
eee333
Freshman
Freshman
 
Posts: 9
Joined: Tue Mar 25, 2008 10:35 pm

Top

Postby AndreySerj » Wed Mar 26, 2008 12:46 pm

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. Location myLocation = myLocationManager.getCurrentLocation("gps");
  3.  
  4. ...
  5.  
  6. myLocation.getLatitude(),
  7.  
  8. myLocation.getLongitude()
  9.  
  10.  
Parsed in 0.011 seconds, using GeSHi 1.0.8.4
AndreySerj
Developer
Developer
 
Posts: 31
Joined: Wed Dec 26, 2007 9:57 am
Location: Minsk

Postby eee333 » Wed Mar 26, 2008 11:10 pm

Cheers!

Works great, thanks!
eee333
Freshman
Freshman
 
Posts: 9
Joined: Tue Mar 25, 2008 10:35 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 8 guests