Example #1
0
 @Override
 public void onLocationChanged(Location arg0) {
   GeoPoint my_pos = new GeoPoint(arg0.getLatitude(), arg0.getLongitude());
   item2.setPoint(my_pos);
   // pour raffraichir en touchant l'écran
   // mapView.refreshDrawableState();
   // pour recentrer à chaque clique
   if (clique == 1) {
     mapView.setCenter(my_pos);
     clique = 0;
   }
 }
 @Override
 public void onLocationChanged(Location arg0) {
   // Mise à jour du marker si ma position sur le GPS change
   GeoPoint my_pos = new GeoPoint(arg0.getLatitude(), arg0.getLongitude());
   MarkerLocation.setPoint(my_pos);
 }