현재 학교에서 안드로이드 어플 개발관련 프로젝트 과제를 진행중인데
네이버 지도 api를 이용해 현재 위치와 업소 위치를 나타내는건데
네이버 지도 api를 이용해서 지도는 동작이 되는걸 확인, 구현했는데
이 지도를 현재 개발중인 어플에 집어넣는 방법을 몰라서 질문드립니다.
//XML 부분
<?xml version="1.0" encoding="utf-8"?>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal" >
<Button
android:id="@+id/storebackbtn4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:text="뒤로"
android:textSize="10sp"/>
<TextView
android:id="@+id/backbtn2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:layout_gravity="center"
android:text="위치 보기"
android:textSize="20sp"
android:gravity="center"/>
<Button
android:id="@+id/bookmark"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:text="즐겨찾기"
android:textSize="10sp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="메인"/>
</LinearLayout>
</LinearLayout>
//소스 부분
package com.app.store;
import com.app.ulsanuniv.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import com.app.*;
import com.nhn.android.maps.NMapView;
public class StoreMap extends Activity{
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_storemap);
findViewById(R.id.storebackbtn4).setOnClickListener(mClickListener);
}
Button.OnClickListener mClickListener = new Button.OnClickListener(){
public void onClick(View v){
if(v.getId() == R.id.storebackbtn4){
finish();
}
}
};
}