I have this from LocationListener but this code just give 4
or 5
digits accurate, like 43.1234
, I want more accuracy like 43.1234567
, so how to do that?
private LocationListener mLocationListener = new LocationListener() {
@Override
public synchronized void onLocationChanged(Location l) {
strLatLng = l.getLatitude() + "," + l.getLongitude();
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
};
It's not important if it has another way and not in LocationListener
, I get this accuracy just when I write on google map setOnMapClickListener
like this:
Is there anyway else get this accuracy?
googleMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
public void onMapClick(LatLng CLICKED_LOC) {
double lx,ly;
lx = CLICKED_LOC.latitude;
ly = CLICKED_LOC.longitude;
strLatLng = lx+","+ly;
}
});