1
コンパスのようなものを使用して、特定の場所を指すように経度/緯度の値を渡しています。移動中に矢印を描くことができます電話を(GPSを使用して)位置を決定する。GPSを使ってアンドロイドで画像を回転する特定の場所を指す値
私の代わりにあなたは二つのことを行う必要があり、描画事
public void draw(Canvas canvas) {
double angle = calculateAngle(currentLongitude, currentLatitude, targetLongitude, targetLatitude);
//Correction;
angle-=90;
//Correction for azimuth
angle-=azimuth;
if((getContext() instanceof Activity) && ((Activity)getContext()).getWindowManager().getDefaultDisplay().getOrientation()==Configuration.ORIENTATION_PORTRAIT)angle-=90;
while(angle<0)angle=angle+360;
Rect rect = canvas.getClipBounds();
int height = rect.bottom-rect.top;
int width = rect.right-rect.left;
int left = rect.left;
int top = rect.top;
}
移動マップを実装しますか? – menjaraz
このコードは何も描画していないため、if-caseが適切であるwhile-loopのような他の問題があるため、問題の一部が欠けているようです – NikkyD