2013-02-05 2 views
0

얼마 전에 Google지도 Android API v2를 사용하도록 내지도 클래스를 업데이트했습니다. 내 응용 프로그램에서 클래스를 사용하여 현재 위치를 저장합니다. 나는 코드로지도에 내 위치에 마커를 추가하려고 할 때 :Google지도가 정확한 위치를 표시하지 않습니다.

Log.e(tag,"adding user_marker at lat = " + Common.curLocation.getLatitude() 
+ ",lng = " + Common.curLocation.getLongitude()); 
User_Curr_Position = new LatLng(Common.curLocation.getLatitude(), 
    Common.curLocation.getLatitude()); 
mUser_Curr_Position_Marker = mMap.addMarker(new 
MarkerOptions().position(User_Curr_Position).title("Your Position").draggable(true)); 

는 나에게 (어딘가 깊은 바다에서) 잘못된 위치했다. 로그에서 위도와 경도를 취하여 잘못된 매개 변수를 입력하지 않았는지 확인했습니다 (인터넷에있는 "go = 32.165603, lng = 34.81224"에 user_marker 추가). Google지도에서 올바른 위치를 찾았습니다. 누군가 내가 뭘 잘못하고 있다고 말할 수 있습니까?

답변

1

글쎄, 당신은 경도로 사용자의 위도를 전달합니다.

User_Curr_Position = new LatLng(Common.curLocation.getLatitude(), Common.curLocation.getLatitude()); 

User_Curr_Position = new LatLng(Common.curLocation.getLatitude(), Common.curLocation.getLongitude()); 
+1

때로는 또 다른 당신의 앞에 모든 시간 ... 내 실수 ... 들으에 무엇인지 볼 수 있어야합니다 – yehudahs

관련 문제