Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting latitude and longitude %.8f #5

Open
collinsdevp opened this issue Apr 16, 2017 · 0 comments
Open

Getting latitude and longitude %.8f #5

collinsdevp opened this issue Apr 16, 2017 · 0 comments
Labels

Comments

@collinsdevp
Copy link
Owner

collinsdevp commented Apr 16, 2017

Getting the precise location you need the GPS data to be in 8 decimal place.

private void updateDisplay() {
    if(mCurrentLocation == null) {
        tv3.setText("Determining Your Location...");
    } else {
    	loc[1] = mCurrentLocation.getLatitude();
    	loc[0] = mCurrentLocation.getLongitude();

    	tv3.setText("");
    	tv6.setText(String.format("Lon: %.8f", mCurrentLocation.getLongitude()));
    	tv7.setText(String.format("Lat: %.8f", mCurrentLocation.getLatitude()));
    	
    	// get elevation from google
    	Elevation_Insert("https://maps.googleapis.com/maps/api/elevation/json?locations="+ mCurrentLocation.getLatitude()+","+mCurrentLocation.getLongitude()+"&key=AIzaSyCEhYHn0AQJC7RyfdhUpi3-ff0Qy44E464");
         
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant