码迷,mamicode.com
首页 > 移动开发 > 详细

android mapView

时间:2015-07-04 10:55:47      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:

1.Because the Maps library is not a part of the standard Android library, you must declare it in the Android Manifest as a child of the element: 

2.You also need access to the Internet in order to retrieve map tiles, so you must also add the following as a child of the element: 
 
3.Open the res/layout/main.xml file and add a single MapView as the root node: 
<xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    android:apiKey="Your Maps API Key goes here"
/>
4.获取apiKey:
4.1打开Eclipse,选择Windows->Preference->Android->Build,这里便是你debug.keystore的路径
4.2在cmd中键入
cd debug.keystore的路径
keytool -list -keystore debug.keystore
获得MD5编码 
4.3去http://code.google.com/android/maps-api-signup.html 输入MD5编码,得到由google签署的Adroid Maps API key

android mapView

标签:

原文地址:http://www.cnblogs.com/qionglouyuyu/p/4620223.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!