Convertir latitude et de la longitude de l'adresse de Google Maps ApiV2

Je fais une démo application avec Google Maps Api V2.

J'ai ajouté un simple marqueur et ont fait d'elle déplaçable

Voici mon code:

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.demo_v2);
googleMap = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
googleMap.setOnMapClickListener(this);
googleMap.setOnMarkerDragListener(this);
googleMap.setOnMapLongClickListener(this);
googleMap.setInfoWindowAdapter(new InfoWindowAdapter() {
@Override
public View getInfoWindow(Marker arg0) {
return null;
}
@Override
public View getInfoContents(Marker marker) {
LayoutInflater inflater = (LayoutInflater) MapsDemo.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View v = inflater.inflate(R.layout.custom_info, null);
TextView tv = (TextView)v.findViewById(R.id.textView1);
tv.setText(marker.getSnippet());
return v;
}
});
googleMap.setMyLocationEnabled(true);
googleMap.getUiSettings().setRotateGesturesEnabled(true);
googleMap.getUiSettings().setTiltGesturesEnabled(true);
marker = googleMap.addMarker(new MarkerOptions()
.position(ROMA)
.title("Hello")
.snippet("Nice Place")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_launcher))
.draggable(true));
@Override
public void onMarkerDrag(Marker marker) {
//TODO Auto-generated method stub
}
@Override
public void onMarkerDragEnd(Marker marker) {
LatLng field = marker.getPosition();
System.out.println("LatitudenLongitude:"+field.latitude+" "+field.longitude);
}
@Override
public void onMarkerDragStart(Marker marker) {
//TODO Auto-generated method stub
}
@Override
public void onMapLongClick(LatLng latlng) {
//TODO Auto-generated method stub
}
@Override
public void onMapClick(LatLng latlng) {
//TODO Auto-generated method stub
}

}

Maintenant, je veux que lorsque l'adresse devrait sortir lorsque l'utilisateur clique sur le marqueur.

Simple question est : Voulez-vous pour obtenir l'adresse( nom) de Lat Long de l'API v2

InformationsquelleAutor Gaurav Arora | 2013-03-29