我想在我的應用中加載地圖,但無法解釋來自Google開發人員文檔的幫助。Android:誰能舉例說明如何使用google map v2加載地圖?
-3
A
回答
1
我最近更新可能和關注這個步驟,希望可以幫助您在短
step [1]
更新您的sdk
和檢查Google Play service
step [2]
轉到SDK路徑就像C:\android-sdk-windows\extras\google
和導入谷歌Play業務Libray在workspace
step [3]
在您的項目中添加library
step [4]
在XML放像
<fragment
android:id="@+id/mapview"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/includefooter"
android:layout_below="@+id/relativetop" />
step [5]
在活動像
public class YourActivi extends FragmentActivity {
....
GoogleMap mapView;
mapView = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.mapview)).getMap();
}
步[6]在清單
<permission
android:name="com.tixe.Activity.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="YourPackage.permission.MAPS_RECEIVE" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="yourKey" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
還要檢查需要許可。
+0
感謝@ankitmakwana它工作並加載了地圖。 – 2013-04-24 10:38:43
1
當我在我的android應用程序中集成了相同的功能時,那次整合讓我感到噁心。從這裏適當的步驟https://developers.google.com/maps/documentation/android/幫助我很多。重要的是要記住,不要忘記從Android SDK Manager安裝Google API。
相關問題
- 1. Google地圖Android API V2和Google Place API的使用限制說明
- 2. Google Map v2 android
- 3. 如何使用Google地圖Android API v2
- 4. Android Google Map V2 InfoWindow
- 5. Android地圖V2無法加載地圖
- 6. Google Map Api v2沒有地圖視圖
- 7. 無法加載地圖使用谷歌地圖的Android API V2
- 8. Android - Google map api v2&android 2.3.7
- 9. Google地圖V2按鈕無法加載
- 10. Android工作室Google地圖:V2地圖未完全加載
- 11. 如何在Android中顯示Google Map v2
- 12. 嘗試加載Google地圖V2時Android應用崩潰[解決!]
- 13. 如何添加Google製造商地圖名稱和說明
- 14. Google Map V2 Android,「error import com.google.android.gms.maps.model.LatLng」
- 15. google map api v2 android-java.lang.NullPointerException
- 16. Android Google Map Api V2 OnCameraChangeListener
- 17. Android Google MAP V2 map.setMyLocationEnabled(true)
- 18. 如何在Android Google Map上顯示地圖圖例?
- 19. 如何使android map maps v2中的地圖對象(例如:圓圈)可點擊?
- 20. Google地圖Android V2 - 如何在GroundOverlay上使用在線圖像?
- 21. 如何從地圖實例創建Google地球實例 - google api v2到v3
- 22. Android Studio Google地圖v2
- 23. 如何從Google MAP下載android地圖貼圖?
- 24. 舉例說明使用亞音速3
- 25. 如何在google maps v2中使用android map utils庫實現InfoWindow?
- 26. 使用google map api v2時無法顯示地圖?
- 27. Android和Google Map API v2 - 顯示地圖時顯示爲空
- 28. 如何實現Google Map Api V2 Android的搜索功能?
- 29. Google map v2 api:如何顯示特定地圖區域
- 30. 如何在Google Map API v2中處理地圖的onTouch事件?
檢查此鏈接,如果你還沒有經歷。 http://www.vogella.com/articles/AndroidGoogleMaps/article.html – Hemanth 2013-04-24 10:14:10
嘗試先在谷歌搜索。 – 2013-04-24 10:32:57