Submit Search
Upload
Google Map Android API V2 setup guide
•
11 likes
•
4,742 views
CAVEDU Education
Follow
Google Map Android API V2 setup guide, 按圖施工保證成功
Read less
Read more
Software
Report
Share
Report
Share
1 of 34
Download now
Download to read offline
Recommended
Google maps SDK for iOS 1.4
Google maps SDK for iOS 1.4
Michael Pan
開放原始碼 Ch2.2 app - oss - google client api & app engine(ver 1.0)
開放原始碼 Ch2.2 app - oss - google client api & app engine(ver 1.0)
My own sweet home!
Link budget satalite for calculation system
Link budget satalite for calculation system
University of Technology
Link budget calculation
Link budget calculation
sitimunirah88
Android gradle 从入门到gg 3
Android gradle 从入门到gg 3
Jun Liu
Android開發app
Android開發app
騰昱 魏
GDG Taichung: What is new in Firebase
GDG Taichung: What is new in Firebase
Duran Hsieh
開放原始碼 Ch1.3 intro - oss - google codes (ver 2.0)
開放原始碼 Ch1.3 intro - oss - google codes (ver 2.0)
My own sweet home!
Recommended
Google maps SDK for iOS 1.4
Google maps SDK for iOS 1.4
Michael Pan
開放原始碼 Ch2.2 app - oss - google client api & app engine(ver 1.0)
開放原始碼 Ch2.2 app - oss - google client api & app engine(ver 1.0)
My own sweet home!
Link budget satalite for calculation system
Link budget satalite for calculation system
University of Technology
Link budget calculation
Link budget calculation
sitimunirah88
Android gradle 从入门到gg 3
Android gradle 从入门到gg 3
Jun Liu
Android開發app
Android開發app
騰昱 魏
GDG Taichung: What is new in Firebase
GDG Taichung: What is new in Firebase
Duran Hsieh
開放原始碼 Ch1.3 intro - oss - google codes (ver 2.0)
開放原始碼 Ch1.3 intro - oss - google codes (ver 2.0)
My own sweet home!
Firebase 基礎上手 |2小時由入門到精通 | GDSC NYCU
Firebase 基礎上手 |2小時由入門到精通 | GDSC NYCU
秀吉(Hsiu-Chi) 蔡(Tsai)
GDG Taichung - Flutter and Firebase.pdf
GDG Taichung - Flutter and Firebase.pdf
Duran Hsieh
GPS + Google fusion table 雲端應用
GPS + Google fusion table 雲端應用
艾鍗科技
Sencha touch 2 訓練課程 2 android環境建置
Sencha touch 2 訓練課程 2 android環境建置
My own sweet home!
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
Edward Kuo
App introduction
App introduction
Jerromy Lee
Port android to black berry 10.pptx
Port android to black berry 10.pptx
Simon HSU
CICD Workshop 20180922
CICD Workshop 20180922
Earou Huang
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰
Will Huang
豆瓣Paa s平台 dae - 2017
豆瓣Paa s平台 dae - 2017
Tianwei Liu
HTML5 生态系统和应用架构模型
HTML5 生态系统和应用架构模型
Tom Fan
Android gradle 从入门到gg 0
Android gradle 从入门到gg 0
Jun Liu
導入 Flutter 前你應該知道的事
導入 Flutter 前你應該知道的事
Weizhong Yang
GitHub android 40項熱門技術
GitHub android 40項熱門技術
勝全 謝
Service Integration Workshop
Service Integration Workshop
Ryan Chung
Google TPU Edge SBC_190424
Google TPU Edge SBC_190424
CAVEDU Education
From computational Thinking to computational Action - Dr. Hal Abelson, MIT Ap...
From computational Thinking to computational Action - Dr. Hal Abelson, MIT Ap...
CAVEDU Education
180321 MIT見聞分享
180321 MIT見聞分享
CAVEDU Education
BBC Micro:bit beginner project
BBC Micro:bit beginner project
CAVEDU Education
LINE Messaging API with LinkIt 7697
LINE Messaging API with LinkIt 7697
CAVEDU Education
Latte panda workshop_japan
Latte panda workshop_japan
CAVEDU Education
拿鐵熊貓外殼設計0707
拿鐵熊貓外殼設計0707
CAVEDU Education
More Related Content
Similar to Google Map Android API V2 setup guide
Firebase 基礎上手 |2小時由入門到精通 | GDSC NYCU
Firebase 基礎上手 |2小時由入門到精通 | GDSC NYCU
秀吉(Hsiu-Chi) 蔡(Tsai)
GDG Taichung - Flutter and Firebase.pdf
GDG Taichung - Flutter and Firebase.pdf
Duran Hsieh
GPS + Google fusion table 雲端應用
GPS + Google fusion table 雲端應用
艾鍗科技
Sencha touch 2 訓練課程 2 android環境建置
Sencha touch 2 訓練課程 2 android環境建置
My own sweet home!
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
Edward Kuo
App introduction
App introduction
Jerromy Lee
Port android to black berry 10.pptx
Port android to black berry 10.pptx
Simon HSU
CICD Workshop 20180922
CICD Workshop 20180922
Earou Huang
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰
Will Huang
豆瓣Paa s平台 dae - 2017
豆瓣Paa s平台 dae - 2017
Tianwei Liu
HTML5 生态系统和应用架构模型
HTML5 生态系统和应用架构模型
Tom Fan
Android gradle 从入门到gg 0
Android gradle 从入门到gg 0
Jun Liu
導入 Flutter 前你應該知道的事
導入 Flutter 前你應該知道的事
Weizhong Yang
GitHub android 40項熱門技術
GitHub android 40項熱門技術
勝全 謝
Service Integration Workshop
Service Integration Workshop
Ryan Chung
Similar to Google Map Android API V2 setup guide
(15)
Firebase 基礎上手 |2小時由入門到精通 | GDSC NYCU
Firebase 基礎上手 |2小時由入門到精通 | GDSC NYCU
GDG Taichung - Flutter and Firebase.pdf
GDG Taichung - Flutter and Firebase.pdf
GPS + Google fusion table 雲端應用
GPS + Google fusion table 雲端應用
Sencha touch 2 訓練課程 2 android環境建置
Sencha touch 2 訓練課程 2 android環境建置
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
App introduction
App introduction
Port android to black berry 10.pptx
Port android to black berry 10.pptx
CICD Workshop 20180922
CICD Workshop 20180922
Visual Studio 2015 與 Git 開發實戰
Visual Studio 2015 與 Git 開發實戰
豆瓣Paa s平台 dae - 2017
豆瓣Paa s平台 dae - 2017
HTML5 生态系统和应用架构模型
HTML5 生态系统和应用架构模型
Android gradle 从入门到gg 0
Android gradle 从入门到gg 0
導入 Flutter 前你應該知道的事
導入 Flutter 前你應該知道的事
GitHub android 40項熱門技術
GitHub android 40項熱門技術
Service Integration Workshop
Service Integration Workshop
More from CAVEDU Education
Google TPU Edge SBC_190424
Google TPU Edge SBC_190424
CAVEDU Education
From computational Thinking to computational Action - Dr. Hal Abelson, MIT Ap...
From computational Thinking to computational Action - Dr. Hal Abelson, MIT Ap...
CAVEDU Education
180321 MIT見聞分享
180321 MIT見聞分享
CAVEDU Education
BBC Micro:bit beginner project
BBC Micro:bit beginner project
CAVEDU Education
LINE Messaging API with LinkIt 7697
LINE Messaging API with LinkIt 7697
CAVEDU Education
Latte panda workshop_japan
Latte panda workshop_japan
CAVEDU Education
拿鐵熊貓外殼設計0707
拿鐵熊貓外殼設計0707
CAVEDU Education
LinkIt 7697 outer case - DesignSpark Mechanical / Onkscape
LinkIt 7697 outer case - DesignSpark Mechanical / Onkscape
CAVEDU Education
170615 國中小自造者教育師資培訓營
170615 國中小自造者教育師資培訓營
CAVEDU Education
170522_Raspberry Pi 相容開發板
170522_Raspberry Pi 相容開發板
CAVEDU Education
LinkIt 7697 IoT tutorial
LinkIt 7697 IoT tutorial
CAVEDU Education
Maker Movement and Education in Taiwan
Maker Movement and Education in Taiwan
CAVEDU Education
物聯網教學與上海深圳maker行
物聯網教學與上海深圳maker行
CAVEDU Education
161123
161123
CAVEDU Education
IBM以雲端技術與物聯網創新產業應用@2016 New Taipei Maker Faire
IBM以雲端技術與物聯網創新產業應用@2016 New Taipei Maker Faire
CAVEDU Education
AAEON 當創客碰上UP板 - Intel Cherry Trail 高效能maker開發者平台@2016 new taipei maker faire
AAEON 當創客碰上UP板 - Intel Cherry Trail 高效能maker開發者平台@2016 new taipei maker faire
CAVEDU Education
物聯網好棒棒 您專屬的IoT私有雲平台
物聯網好棒棒 您專屬的IoT私有雲平台
CAVEDU Education
絕地武士心靈控制家用雲端智慧型物聯網光劍搭載無線路由器光劍底座Final
絕地武士心靈控制家用雲端智慧型物聯網光劍搭載無線路由器光劍底座Final
CAVEDU Education
LinkIt ONE tutorial #1- Basics
LinkIt ONE tutorial #1- Basics
CAVEDU Education
LinkIt ONE tutorial #2- Communication and cloud service
LinkIt ONE tutorial #2- Communication and cloud service
CAVEDU Education
More from CAVEDU Education
(20)
Google TPU Edge SBC_190424
Google TPU Edge SBC_190424
From computational Thinking to computational Action - Dr. Hal Abelson, MIT Ap...
From computational Thinking to computational Action - Dr. Hal Abelson, MIT Ap...
180321 MIT見聞分享
180321 MIT見聞分享
BBC Micro:bit beginner project
BBC Micro:bit beginner project
LINE Messaging API with LinkIt 7697
LINE Messaging API with LinkIt 7697
Latte panda workshop_japan
Latte panda workshop_japan
拿鐵熊貓外殼設計0707
拿鐵熊貓外殼設計0707
LinkIt 7697 outer case - DesignSpark Mechanical / Onkscape
LinkIt 7697 outer case - DesignSpark Mechanical / Onkscape
170615 國中小自造者教育師資培訓營
170615 國中小自造者教育師資培訓營
170522_Raspberry Pi 相容開發板
170522_Raspberry Pi 相容開發板
LinkIt 7697 IoT tutorial
LinkIt 7697 IoT tutorial
Maker Movement and Education in Taiwan
Maker Movement and Education in Taiwan
物聯網教學與上海深圳maker行
物聯網教學與上海深圳maker行
161123
161123
IBM以雲端技術與物聯網創新產業應用@2016 New Taipei Maker Faire
IBM以雲端技術與物聯網創新產業應用@2016 New Taipei Maker Faire
AAEON 當創客碰上UP板 - Intel Cherry Trail 高效能maker開發者平台@2016 new taipei maker faire
AAEON 當創客碰上UP板 - Intel Cherry Trail 高效能maker開發者平台@2016 new taipei maker faire
物聯網好棒棒 您專屬的IoT私有雲平台
物聯網好棒棒 您專屬的IoT私有雲平台
絕地武士心靈控制家用雲端智慧型物聯網光劍搭載無線路由器光劍底座Final
絕地武士心靈控制家用雲端智慧型物聯網光劍搭載無線路由器光劍底座Final
LinkIt ONE tutorial #1- Basics
LinkIt ONE tutorial #1- Basics
LinkIt ONE tutorial #2- Communication and cloud service
LinkIt ONE tutorial #2- Communication and cloud service
Google Map Android API V2 setup guide
1.
Google Map #1 根據Google
Maps Android API V2更新 曾吉弘 nissin@cavedu.com 1
2.
大綱 • Google Maps
Android API V2 • 申請Google Map API Key • 載入Google Map - GMap 2
3.
環境建置 Google Maps Android
API V2 3
4.
步驟 1. 安裝 Google
Play services SDK 2. 取得SHA1 憑證 3. Google APIs Console取得API key 4. 設定權限 5. 加入地圖 4
5.
V1 / V2比一比 •
V1 的專案版本一定要為GoogleAPI,V2則 免。 • V1 的地圖元件為 MapView,現已停用。 V2之後改為 Fragment 5
6.
新增專案Maps package name需與金鑰相同 根據Google 官方文件操作 https://developers.google.com/m aps/documentation/android/start ?hl=zh-TW 6
7.
安裝Google Play services
SDK • 請由 SDK Manager 中安裝[Google Play services] 7
8.
匯入到Eclipse中 • FileImport • Existing
Android Code Into Workspace – <SDK>extras/google/google_play_services /libproject/google-play-services_lib 專案。 8
9.
勾選Is Library • 請勾選Is
Library, 否則無法從外部 專案匯入。
10.
會在畫面左側看到這個lib
11.
新增專案GMap
12.
在專案中匯入libs • 對專案目錄點右鍵 PropertiesAn droid • Add
libraries,請 記得不要勾選 Is Library。Lib本身 才要勾選。 • 完成如右圖 12
13.
產生SHA1 • 在cmd下切換到 cd
C:Program FilesJavajdk1.7.0_10bin • 輸入: – keytool -list -v -keystore C:Usersuser.androiddebug.keystore • 以上紅字會因為不同電腦或軟體版本有所不同 • 金鑰密碼請直接按ENTER 13
14.
找到SHA1 那一行,其他不是 14
15.
自己產生debug.keystore • C:Program FilesJava<JDK>bin>輸入: •
keytool -genkey -v -keystore <完整路徑 >debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US – http://stackoverflow.com/questions/8576732/ther e-is-no-debug-keystore-in-android-folder • Win7 C:/Users/<帳號>/.android/ • XP Document and Settings (路徑包含空格會造 成錯誤,可將檔案產生在其它位置) 15
16.
Google API console •
https://code.google.com/apis/console/ #project:48090014903 16
17.
啟動 Google Maps
Android API V2服務 17
18.
API Access取得API Key 18
19.
格式:SHA1;package name package name改成自己的專案名稱 19
20.
修改AndroidManifest.xml -1 • 在<application>元素中加入子標籤 •
your_api_key請填入剛剛申請好API KEY – <meta-data android:name="com.google.android.maps.v2.API _KEY" android:value="your_api_key"/> – <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_v ersion"/> 20
21.
修改AndroidManifest.xml -2 • 加入權限 –
<permission android:name="com.example.mapdemo.p ermission.MAPS_RECEIVE" android:protectionLevel="signature"/> – <uses-permission android:name="com.example.mapdemo.p ermission.MAPS_RECEIVE"/> • 其中com.example.mapdemo換成自己的。 21
22.
加入其他權限 1. <uses-permission android:name="android.permission.INTERNET"/> 2.
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 3. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 4. <uses-permission android:name="com.google.android.providers.gsf.permission.READ_G SERVICES"/> 5. <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> 6. <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> • 5, 6項只有要用到定位功能時才要加入,但通常都會用到所以就加吧 22
23.
Layout(fragment_main.xml) 內容要改為 fragment <?xml version="1.0"
encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com/apk /res/android" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" android:name="com.google.android.gms.m aps.MapFragment"/> 以上請將layout.xml 內容全部取代掉即可,不用改東 西 23
24.
修改MainActivity.xml public class MainActivity
extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout. fragment_main); //只載入畫面無進一步動作 } }
25.
載入Google Map 25
26.
除錯小提醒 1. 請確認使用 debug.keystore
來產生 SHA1 2. 記得在 AndroidManifest.xml 中加入 API Key 、meta data與相關權限 3. 確認網路暢通 4. 有無匯入 Google Play services libraries 26
27.
Package 要修改的地方
28.
如果要執行於模擬器則較麻煩 • 因為模擬器並未安裝Google Play
service,所 以要另外安裝。 • 建議實機操作 • http://nkeegamedev.blogspot.tw/2012/ 12/android-google-maps-api- v2.html#uds-search-results 28
29.
載入官方example • https://developers.google.com/maps/d ocumentation/android/intro#sample_co de • 改為自己的
package name 與 API Key 29
30.
Google Map Javascript
V3 • https://developers.google.com/maps/documenta tion/javascript/tutorial?hl=zh-tw • 使用 Javascript 來取得地圖網頁 • 教學: – http://nkeegamedev.blogspot.tw/2012/12/android- google-map-v3-1.html • 好用的生成器: http://www.nap.st/google_map_generator/?lang =zh-TW 30
31.
資料 • https://developers.google.com/maps/documentation/and roid/start • 原有的怎麼辦?還是可以用,但無法再取得V1
的API Key了。 • http://www.moke.tw/wordpress/computer/advanced/410 • http://nkeegamedev.blogspot.tw/2012/12/android- google-maps-api-v2.html • http://saleh360.blogspot.tw/2012/12/android-running- google-maps-api-v2_12.html • http://fecbob.pixnet.net/blog/post/38591179-google- maps-android-api- v2%E4%BD%BF%E7%94%A8%E5%8F%8A%E5%95%8F%E 9%A1%8C%E8%A7%A3%E6%B1%BA 31
32.
資料 • 中研院GIS中心 • http://gis.rchss.sinica.edu.tw/ •
中研院GIS中心工具集 http://gis.ascc.net/ISTIS/tools.html • http://simonown.wordpress.com/2009/11/ 22/aa0007/ • 金門大學 http://gogkmit.wikidot.com/start • 畫出GPS路徑 http://changyy.pixnet.net/blog/post/28058 989 32
33.
資料 • 座標轉換 http://gis.thl.ncku.edu.tw/coordtrans/co ordtrans.aspx • 景點分享 •
http://www.wikigps.com/ 33
34.
補充資料:取得Google MAPs android API
V2 • http://wangshifuola.blogspot.tw/2013/01/androidgo ogle-maps-android-api-v2.html • http://www.moke.tw/wordpress/computer/advanced/ 410 • 按部就班http://cheng-min-i- taiwan.blogspot.tw/2013/04/google-maps-android- api-v2-android.html 34
Download now