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 - Map Activity just showing blue screen!

Map Activity just showing blue screen!

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

Map Activity just showing blue screen!

Postby jr83 » Fri Feb 04, 2011 12:02 pm

Hi,
I am trying to get certain location to display on a map on screen (on a device). I pull the lat/long from a sqlite db and then input them into a function as follows:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public static void navigateToLocation(double latitude, double longitude, MapView mv) {
  2.                 GeoPoint p = new GeoPoint((int) latitude, (int) longitude);
  3.                 mv.displayZoomControls(true);
  4.                 MapController mc = mv.getController();
  5.                 mc.animateTo(p);
  6.                 int zoomlevel = mv.getMaxZoomLevel();
  7.                 mc.setZoom(zoomlevel - 1);
  8.                 mv.setSatellite(false);
  9.         }
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


The screen will display as grey/blue and any logs I put in will appear in the logcat. However I get the error 'Couldnt get connection factory client'. I have tried googling to see what the issue is but most suggestions are to do with the api key. I have already got a valid api key as this is used throughout the app and displays my location in a different activity. It's when I try to use my lat/long co-ordinates it throws the error.
Any help would be much appreciated.
By the way this works on a different device!
Thanks,
jr83
jr83
Junior Developer
Junior Developer
 
Posts: 12
Joined: Thu Sep 16, 2010 5:21 pm

Top

Re: Map Activity just showing blue screen!

Postby romansvillage » Wed Feb 09, 2011 9:34 am

I don't know if that is the only problem. GeoPoint uses microdegrees (http://code.google.com/android/add-ons/ ... Point.html).

Additionally, you zoom in to max - 1, so if your coordinate is in the water, you probably wont see anything else than blue...

Try:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. GeoPoint p = new GeoPoint((int) (latitude * 1E6), (int) (longitude * 1E6));
Parsed in 0.010 seconds, using GeSHi 1.0.8.4
romansvillage
Freshman
Freshman
 
Posts: 3
Joined: Tue Feb 08, 2011 1:54 pm

Re: Map Activity just showing blue screen!

Postby jr83 » Wed Feb 09, 2011 10:28 am

Your right the microdegrees was the issue.
Thanks a lot.
jr83
Junior Developer
Junior Developer
 
Posts: 12
Joined: Thu Sep 16, 2010 5:21 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 3 guests