我有錯誤:「構造函數GeoPoint(double,double)未定義」。爲什麼這樣?如何做到這一點?據我所知,所有必要的庫鏈接和語法似乎是正確的。構造函數GeoPoint(double,double)未定義。那有什麼問題?
package com.fewpeople.geoplanner;
import android.app.Activity;
import android.os.Bundle;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
public class GeoplannerActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final MapView mMapView = (MapView) findViewById(R.id.mapview);
MapController mMapController = mMapView.getController();
double x, y;
x= 60.113337;
y= 55.151317;
mMapController.animateTo(new GeoPoint(x, y));
mMapController.setZoom(15);
}
protected boolean isRouteDisplayed() {
return false;
}
}
非常感謝你!有用! –