2013-11-04 3 views

답변

-1

이 링크를 따라 가십시오. Google Maps Android: How can i draw a route line to see directions & 위치를 추적하기위한 위도 경도 값을 모두 저장하십시오. 방향 얻기를위한

사용 API를

"http://maps.googleapis.com/maps/api/directions/json?" 
       + "origin=" + start.latitude + "," + start.longitude 
       + "&destination=" + end.latitude + "," + end.longitude 
       + "&sensor=false&units=metric&mode=driving"; 

또는

만 위치가

public void onLocationChanged(Location location) { 
     if (lastLocationloc == null) { 
       lastLocationloc = location; 
      } 
     //public void setPoints (List<LatLng> points) 
     LatLng LatLng_origin = new LatLng(13.133333, 78.133333); //kolar 
     LatLng LatLng3 = new LatLng(21.4949767, 86.942657999); // bbsr 
     TextView tvLocation = (TextView) findViewById(R.id.add); 
     double latitude = location.getLatitude(); 
     double longitude = location.getLongitude(); 
     LatLng latLng = new LatLng(latitude, longitude); 
     googleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng)); 
     googleMap.animateCamera(CameraUpdateFactory.zoomTo(10)); 

     tvLocation.setText("Latitude:" + latitude + ", Longitude:" + longitude); 


    } 

더 이상의 의심 사용 추적하려면?