마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

네이버 지도를 개발중인 어플에 넣고 싶은데요..

0 추천

현재 학교에서 안드로이드 어플 개발관련 프로젝트 과제를 진행중인데

네이버 지도 api를 이용해 현재 위치와 업소 위치를 나타내는건데

네이버 지도 api를 이용해서 지도는 동작이 되는걸 확인, 구현했는데

이 지도를 현재 개발중인 어플에 집어넣는 방법을 몰라서 질문드립니다.

//XML 부분

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    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();
}
}
};
}

 

익명사용자 님이 2013년 12월 20일 질문

1개의 답변

0 추천
지도를 넣을 LinearLayout를 자바에서 뽑아와서

.addView()를 이용하여 할수 있습니다.
KMCPE (260 포인트) 님이 2013년 12월 21일 답변
감사합니다!! 해결됐네요 ㅠㅠㅠㅠ
해결되셨어요? 혹시 그부분만 소스공개 가능한가요?>
...