260 likes | 453 Views
Android Google Maps. 建國科技大學 資管系 饒瑞佶 2011/1. Google Maps. 取得 Google Map API. Step1: 先進入 JDK 目錄. Google Maps. 透過 keytool.exe 建立認證指紋 需要 debug_keystore 路徑. Google Maps. debug_keystore 路徑. Google Maps.
E N D
AndroidGoogle Maps 建國科技大學 資管系 饒瑞佶 2011/1
Google Maps • 取得Google Map API Step1:先進入JDK目錄
Google Maps • 透過keytool.exe建立認證指紋 • 需要debug_keystore路徑
Google Maps • debug_keystore路徑
Google Maps • 輸入keytool–list –alias androiddebugkey –keystore “C:\Documents and Settings\Administrator\.android\debug.keystore” –storepass android –keypass android
Google Maps • 產生認證指紋
Google Maps • 進入Google Map API Key申請頁面 • http://code.google.com/intl/zh-Tw/android/add-ons/google-apis/maps-api-signup.html 輸入認證指紋碼
Google Maps • 進入Google Map API Key申請頁面 • http://code.google.com/intl/zh-Tw/android/add-ons/google-apis/maps-api-signup.html
Google Maps • 產生出API金鑰 0O7bGO2vQxBc90bpYbJ8PnSjJapePPkrSGRvP3A <com.google.android.maps.MapViewandroid:layout_width="fill_parent" android:layout_height="fill_parent" android:apiKey="0O7bGO2vQxBc90bpYbJ8PnSjJapePPkrSGRvP3A" /> 加入main.xml
Google Maps main.xml
Google Maps • 建立新專案: HelloMaps 沒有Google APIs target
Google Maps • 如果沒有Google APIs target • 請選擇Available packages進行安裝
Google Maps • 安裝完Google APIs target畫面
Google Maps • 建立新專案: HelloMaps
顯示Google Maps地圖 加入 改成MapActivity 加入
Google Maps • AVD也要對應具備Google APIs功能
Google Maps • 增加 <uses-permission android:name="android.permission.INTERNET" /> • 在 <application> 裡頭增加 <uses-library android:name="com.google.android.maps" /> 資訊
利用Intent 玩Google Maps • 建立新專案: IntentMaps
利用Intent 玩Google Maps • AVD也要對應具備Google APIs功能
利用Intent 玩Google Maps • 增加 <uses-permission android:name="android.permission.INTERNET" />
更多Google Maps • 更多Google Maps