runOnFirstFix is not executed

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

runOnFirstFix is not executed

Postby afail » Sun Oct 10, 2010 9:16 am


I try to get the current location of the user using MyLocationOverlay, the conventional way (as specified in the ref.):

Code: Select all
myLocationOverlay = new MyLocationOverlay(this, mapView);
        myLocationOverlay.runOnFirstFix(new Runnable() {
            public void run() {
                Log.v("MYLOCATION TO STRING: ", myLocationOverlay.getMyLocation().toString());
                Toast.makeText(getApplicationContext(), myLocationOverlay.getMyLocation().toString(), Toast.LENGTH_SHORT).show();

But the loop does not enter runOnFirstFix never!
I tried logging, putting a Toast and even debugging, the debugger skips the method as it gets to it (does not enter it). The map always locates at Tulsa/USA (and I am in far-away Europe) :) Probably the default location if none is defined/found...

I am using my PC, not a phone device, with an AVD.
Posts: 31
Joined: Sat Oct 02, 2010 8:43 pm


Return to Map Problems

Who is online

Users browsing this forum: No registered users and 3 guests