Make sure longPoint picks up getLongitude() as well.

- Juan

On Oct 28, 9:51 pm, disappearedng <[EMAIL PROTECTED]> wrote:
> Hi everyone
> Please look at my method which involves retrieving a GPS location
> using myManager.getLastKnownLocation("gps").
> I am pretty sure that's not how it works.
>
> Can someone please help me?
>
> public void LoadCoords()        {
>         TextView latText = (TextView) findViewById(R.id.latText);
>         TextView longText = (TextView) findViewById(R.id.longText);
>         LocationManager myManager = (LocationManager)
> getSystemService(Context.LOCATION_SERVICE);
>
>         /*
>         GeoPoint p = new GeoPoint((int) (47.47 * 1E6),(int) (-122.01 *
> 1E6));
>
>         Double latPoint = (double) p.getLatitudeE6();
>         Double longPoint = (double) p.getLongitudeE6();
>
>         */
>         Double latPoint =
> myManager.getLastKnownLocation("gps").getLatitude();
>         Double longPoint =
> myManager.getLastKnownLocation("gps").getLatitude();
>
>         latText.setText(latPoint.toString());
>         longText.setText(longPoint.toString());
>
>     }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to