package com.ercompany.minggle.android.apt.dialog;
import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.Window;
import com.ercompany.minggle.android.apt.R;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
public class MapDialog extends Dialog {
MapFragment fragment;
GoogleMap googleMap;
public MapDialog(Context context) {
super(context);
requestWindowFeature( Window.FEATURE_NO_TITLE);
getWindow().setBackgroundDrawable( new ColorDrawable( Color.TRANSPARENT ) );
setContentView(R.layout.mapdialog);
//googleMap = ((SupportMapFragment)fragment.getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
}
}
현재 자바 코드 입니다.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="300dp"
android:layout_height="300dp"
android:orientation="vertical" >
<fragment android:id="@+id/map"
android:layout_width="fill_parent" android:layout_height="fill_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>
</LinearLayout>
xml부분이구요
기본적인 맵띄우기 까지는 FragmentActivity 를 상속받아서 성공을 했구요 그거를 다이아로그로 띄울려고 하는데요
당연히 그래서 상속을 Dialog 로 바꿧구요 그다음에 진행을 해보려구 하는데 .. googlemap 사용이 처음이고 초보개발자이다 보니 전혀 감이 안오네요 .. 다이어 로그까지만 뜨면 그내부에 맵부분에 경도위도 라던지 이런부분은 또 구글링으로 작성해보겠는데요..
정확한 해결을 하고싶은 부분은
구글맵 v2 가 fragment를 이용해서 액티비티에 보여지게 되는거 같은데요 . 이부분을 다른 액티비티에서 클릭시 new 로 생성해서 보여주는 다이아로그로 띄울려 하는겁니다. 고수님들의 도움이 필요해요