|
查看: 1673|回复: 1
|
android google map API
[复制链接]
|
|
|
如题,请问有谁可以教我如何用吗?有什么方法可以access到 google map API 啊?
我已经弄 androidmanifest.xml 的file 给 com.google.android.maps 了
还是弄不到!!
 |
|
|
|
|
|
|
|
|
|
|
发表于 17-3-2012 12:37 AM
|
显示全部楼层
回复 1# im独行侠
迟来的回复 
Obtaining a Android Google Maps API Key
1. First, you need to find your “Certificate fingerprint (MD5)”. Open your terminal window, and type the following:
keytool -list -alias androiddebugkey -keystore path/debug.keystore -storepass android -keypass android
Path is C:\Users\\.android on vista, C:\Documents and Settings\\.android on xp. And ~/.android on linux or MacOS.
2. Select and copy your MD5 certificate into the clipboard.
It will look similar to: B4:76:E0:10:4C:13:A0:A4:0D:XX:XX:XX:XX:XX:XX:XX
3. Go to http://code.google.com/android/maps-api-signup.html . Paste in the MD5 certificate, agree to the
conditions, and generate the API key.
4. You should now have an API key. Keep it in a safe place. Use it within your layout. (Or a string resource
referenced by your layout).
- <?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/map”
- android:layout_width=“fill_parent”
- android:layout_height=“fill_parent”
- android:apiKey=“Your API key goes here” />
- </LinearLayout>
复制代码 |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|