我有错误:“构造函数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;
}
}
非常感谢你!有用! –