public class Map extends MapActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
MapView mapView = (MapView) findViewById(R.id.myMapView1);
mapView.getController().animateTo(srcGeoPoint);
mapView.getController().setZoom(15);
}
的map.xml的谷歌地圖看上去是空的模擬器
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<com.google.android.maps.MapView
android:id="@+id/myMapView1"
android:layout_width="fill_parent"
android:layout_x="0px"
android:enabled="true"
android:clickable="true"
android:apiKey="Obtained Key here" android:layout_y="105px" android:layout_height="fill_parent">
</com.google.android.maps.MapView>
</LinearLayout>
我檢查日誌,只有一個紅色標誌內,無法找到用於com.google.settings供應商信息。一切似乎都很好。我想知道爲什麼地圖是空的看?當你的地圖API密鑰已過期或沒有與調試簽名密鑰匹配
你運行它在谷歌API模擬器? – Spencer
免費發佈api密鑰是否安全?只是質疑。 – yoshi
你可能想要把它取下來。 :/ – Spencer