We are developing an application for people to mark areas (single points, lines, and polygons) on Google Maps using Android phones (2.1 and up). They are given a Google Maps view and enter the points for the lines by centering the screen at the location that they want to create a point and then press a button on the GUI to add the point at that location.
After entering a point, they recenter the screen on the location for the next point and press the create point button again. After all of the points for that shape have been entered, they switch to another view where they enter some descriptive information and send the information to a central database.
Unfortunately, the points shift by a small amount relative to the locations they were supposed to mark. If the user switches from the summary view back to the point editing view, all of the points will have shifted, some by only a foot and some by as much as 10 or 15 feet. The problem appears to be that
GeoPoint point = mapView.getMapCenter();
returns inaccurate GPS coordinates after the view has been panned. When the points are rendered to a fresh view, they are consistently shown at the same position which correlate well with Google maps views on the internet for those same GPS coordinates. We have extensively debugged the software and the coordinates have the wrong map location / GPS coordinates when they are returned from mapView.getMapCenter();
Because we were concerned that the
Point p = new Point();
mapView.getProjection().toPixels(mapView.getMapCenter(), p);
might not return the screenWidth / 2, screenHeight / 2 location, we actually show the cross-hair used to place points at the toPixels location and the newly created points match up exactly with the cross-hair when they are originally created. After changing to the summary screen and back, they are re-rendered at their real GPS coordinates.
Also, to be clear, this has nothing to do with the accuracy of the GPS sensor.
If we could refresh / reinitialize the map view after panning, it might be awkward, but it would be an improvement over our current problems.
Moving to other map software, meanwhile, would take a lot of time and might have its own problems.
We eventually replaced Google Maps with Bing Maps in our android application, using the Android SDK from InKnowledge. They are providing accurate GPS coordinates for the center of the map view, which we use to build polygons, polylines, and pushpin shapes.