如果我给静态的经度和纬度设置全景街景的位置,它会显示街景,但是如果它捕获了用户的位置,那么它什么也不显示,也没有任何错误提示?
public void onLocationResult(LocationResult locationResult) {
super.onLocationResult(locationResult);
Location location = locationResult.getLastLocation();
if (location == null)
return;
LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());
// LatLng latLng = new LatLng(36.0579667, -112.1430996);
System.out.println("longitude and latitude is as follows===="+latLng.longitude+" ++ "+latLng.latitude);
Log.e(TAG, latLng.latitude + " " + latLng.longitude);
mPanorama.setPosition(latLng);
// If you do not want to cancel the location updates after receiving the first location then comment the below line.
fusedLocationProviderClient.removeLocationUpdates(locationCallback);
}