0
내 갤럭시 S4 4.2.2에서지도를 표시하는 데 문제가 있습니다. 사실 새 안드로이드 학생입니다.지도에서 조각을 사용하려고했습니다. 내 수업지도의 일부 : 조각이있는지도를 표시 할 수 없습니다
public class Map extends Fragment {
private GoogleMap Gmap;
private static LatLng Myposition, position;
Marker marker, myplace;
ArrayList<LatLng> markerPoints;
private Double latitude;
private Double longitude;
private Double t1, t2;
@SuppressLint("NewApi")
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.fragmentmap, null, false);
//Gmap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
Gmap = ((MapFragment) getChildFragmentManager().findFragmentById(R.id.map))
.getMap();
Gmap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
markerPoints = new ArrayList<LatLng>();
GPSTracker gps = new GPSTracker(getActivity());
// check if GPS enabled
if (gps.canGetLocation()) {
latitude = gps.getLatitude();
longitude = gps.getLongitude();
System.out.println("latitude" + latitude);
System.out.println("longitude" + longitude);
.... }
그
가 오류가 있습니다 : 어떤 도움
도움이 되십시오 :( – Lina
앱에 조각이있는지도를 표시하고 싶습니까? – bjiang
사용하지 않는 API를 사용 중이므로 getMap()이 getMapAsync()로 대체되었습니다. – greywolf82