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 - Cast double to string

Cast double to string

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Cast double to string

Postby rd42 » Mon Apr 12, 2010 4:11 pm

getLongitude is a double, addToGPSLog wants a string, is there a way to cast getLongitude to a string in that same line?
Code: Select all
addToGPSLog(location.getLongitude());
User avatar
rd42
Junior Developer
Junior Developer
 
Posts: 22
Joined: Thu Apr 01, 2010 5:12 pm

Top

Postby dalf » Mon Apr 12, 2010 7:09 pm

I think you can find this solution with Google...
You can do:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. String myString = new Double(location.getLongitude()).toString();
  2.  
  3. addToGPSLog(myString);
  4.  
  5.  
Parsed in 0.012 seconds, using GeSHi 1.0.8.4

or maybe
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. addToGPSLog(location.getLongitude() + "");
Parsed in 0.010 seconds, using GeSHi 1.0.8.4



Dalf
dalf
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Mar 10, 2010 4:23 am

Postby rd42 » Mon Apr 12, 2010 7:15 pm

Thanks.
User avatar
rd42
Junior Developer
Junior Developer
 
Posts: 22
Joined: Thu Apr 01, 2010 5:12 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 1 guest