자세히 보기
내컴퓨터- 고급-환경변수-path 밑을 추가한다.
C:\Program Files\Java\jre6\bin
그리고
명령 프롬프트
C:\Documents and Settings\Administrator\.android 를 복사한뒤
cd\ -> cd 우측클릭후 -> dir/w
---
keytool -list -alias androiddebugkey -keystore debug.keystore -storepass android -keypass android
인증서 지문<MD5> : 09:77:F5:34:AB:48:5F:31:56:9D:D0:EA:6A:3B:3A:74
--- 새로운 AVD만들기
-----------------------------------------------------------------------------------
----- MapView 구글맵 지도를 불러온다.
--- MapViewActivity.java
package com.stks.mapView;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import android.app.Activity;
import android.os.Bundle;
public class MapViewActivity extends MapActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MapView mapView = (MapView)findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
mapView.setSatellite(true);
MapController mc = mapView.getController();
// 위도 경도 값이 들어가는 부분
mc.setCenter(new GeoPoint((int)(35.169923), (int)(129.048543)));
}
protected boolean isRouteDisplayed() {
return false;
}
}
--- layout/main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:apiKey="0IJ5DoUjpLnn21eb-cXcYLAzlcZ2YTo-6jZFGkQ"
android:clickable="true"
/>
</LinearLayout>
--- AndroidManifest.xml 인터넷과 연결하는부분
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.stks.mapView"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".MapViewActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- 구글 Map 사용 -->
<uses-library android:name="com.google.android.maps"/>
</application>
<!-- 인터넷 사용권한 -->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
-- 동영상
'progarm_old > [Android]' 카테고리의 다른 글
[Map] 12.03.14 - Google Map Api -1 (0) | 2012.03.14 |
---|---|
[Android] 12.03.13 - 암시적 인텐트 (0) | 2012.03.13 |
[ANDROID] 12.02.23 - Adapter (0) | 2012.02.23 |
[ANDROID] 12.02.22 - 키보드관리,이미지크기,라디오버튼 (0) | 2012.02.22 |
[ANDORID] 12.02.21 - Menu (0) | 2012.02.21 |