小编eli*_*afi的帖子

如何在谷歌地图中平滑移动当前位置?

在我的Android项目中,我需要当车辆移动时,标记位置也应该平滑移动,但是当位置改变时,标记从一个位置跳到另一个位置,移动不平滑。

我搜索了很多,但没有得到结果。
我不知道最好的方法是什么。请给我全面的指导。

非常感谢您

更新

@AnkitMehta 谢谢你的回答

MapsActivity 中的所有代码:

import android.Manifest;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.location.Location;
import android.os.Build;
import android.os.Handler;
import android.os.SystemClock;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;
import android.widget.Toast;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MapStyleOptions;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;

public class MapsActivity extends FragmentActivity …
Run Code Online (Sandbox Code Playgroud)

android google-maps move smoothing marker

1
推荐指数
1
解决办法
6060
查看次数

标签 统计

android ×1

google-maps ×1

marker ×1

move ×1

smoothing ×1