GPS current location
<p>I've been working on this code for some time,everything seems ok but my editor,eclipse keeps telling me to cast myManager. The code is as below,</p>

<pre><code>package com.gps.project;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import android.content.Context;
import android.widget.Button;
/*LOcation based API*/
import android.location.LocationManager;


public class GpsActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        /*Create ab ttuon we are to use in our GPS*/
        final Button gpsButton=(Button) findViewById(R.id.gpsButton);
        gpsButton.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
                LoadCoords();

            }
        });

    }
    public void LoadCoords(){
        /*Create two textfields that will contain information as latitudes and longitudes*/
        TextView latText=(TextView) findViewById(R.id.latText);
        TextView lngText=(TextView) findViewById(R.id.lngText);

        /*Creation of a location manager from which we are to pull the location values*/
        LocationManager myManager=(LocationManager) getSystemService(Context.LOCATION_SERVICE);
        /*To pull the coordinates from myManager, we use the getCurrentLocation( ) method.*/
        Double latPoint = myManager.getCurrentLocation("gps").getLatitude();
        Double lngPoint = myManager.getCurrentLocation("gps").getLongitude();
        /*Finally, take the new Double values and pass them to your TextViews:*/
        latText.setText(latPoint.toString());
        lngText.setText(lngPoint.toString());
    }
}
</code></pre>

<p>Will be glad if someone helps me rectify my the error. I intend to get the longitude and the latitude.</p>
