顯示地圖我創建的Android mapview.but顯示灰度的mapview.iam使用谷歌的MapView自己的API密鑰的谷歌地圖。
如何在沒有灰度的mapview中獲取地圖?
public class MainActivity extends MapActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.google.android.maps.MapView
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:clickable="true"
android:apiKey="AIzaSyBNpjyktHItZYm4no0wTvzSv8tWU5gaoy0" />
</RelativeLayout>
這是我的代碼,它的顯示灰度。如何解決這個問題?
請注意,您正在嘗試使用已棄用的Maps V1。請考慮使用Maps V2。除此之外,您可能會考慮發佈屏幕截圖,顯示您所看到的效果。 – CommonsWare
Divya您可能會在顯示屏上顯示拼貼,因爲當我使用此代碼時,我得到的結果相同,我嘗試了2天。 – Lucifer
你有什麼想法嗎? – android