-1

I am using mylocationoverlay to give my current location, however, its not exactly accurate. Sometimes it is up to 20 meters wrong. I want to be able to move the location marker to my exact position. When using the following code, when I press on the marker, the map moves and the marker stays in the same place. How do I keep the map static and allow a user to move the marker?

   public class selectmap extends MapActivity {
         private MapView mapView;
         @Override
         public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.selectmap);
            mapView = (MapView) findViewById(R.id.map_view);      
            mapView.setBuiltInZoomControls(true);
            final MyLocationOverlay myLocationOverlay = new MyLocationOverlay(this, mapView);
            myLocationOverlay.enableMyLocation();
            mapView.getController().setZoom(17);
            mapView.getOverlays().add(myLocationOverlay);
            mapView.postInvalidate();
          }
   }
user1197941
  • 179
  • 3
  • 16

1 Answers1

0

You have to write your own implementation to handle this scenario. Here is an example application where you can move the markers

https://github.com/commonsguy/cw-advandroid/tree/master/Maps/NooYawkTouch/

Leon
  • 12,013
  • 5
  • 36
  • 59