Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void buildLocationCallback() {
- foregroundlocationcallback = new LocationCallback() {
- @SuppressLint("MissingPermission")
- @Override
- public void onLocationResult(LocationResult locationResult) {
- super.onLocationResult(locationResult);
- for (Location location : locationResult.getLocations()) {
- Log.d("currentlocation", "foregroundlocation" + location.getLatitude());
- curretLatLng = new LatLng(location.getLatitude(),
- location.getLongitude());
- currenttruelatlong = new LatLng(location.getLatitude(),
- location.getLongitude());
- isSource = true;
- setMarker(curretLatLng, isSource);
- map.setMyLocationEnabled(true);;
- setMarkerOnRoad(curretLatLng, curretLatLng);
- animateCameraToMarker(curretLatLng, true);
- }
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement