============ Problem Description ============
I use Baidu map to the top of the time, use a bit of the main code:
Class Myoverlayitem extends itemizedoverlay<overlayitem>{private arraylist<overlayitem> mOverlayList = New Arraylist<overlayitem> ();p rivate double mLat1 = 34.0358298501404; Point1 Latitude private double mLon1 = 108.7622674067471; Point1 Longitude private Double mLat2 = geopointlist.get (0). Getlat (); Private double mLon2 = geopointlist.get (0). Getlongi (); Public Myoverlayitem (drawable drawable) {super (drawable); GeoPoint GeoPoint = new GeoPoint ((int) (MLAT1 * 1E6), (int) (MLon1 * 1E6)); GeoPoint Geopointbaidu = Coordinateconvert.fromwgs84tobaidu (GeoPoint); Moverlaylist.add (New Overlayitem (Geopointbaidu, "point", "point"));p opulate ();
The problem arises, if using mlat1,mlon1 as coordinates can be correctly, but instead of Mlat2,mlon2 on the point hit, mlat2,mlon2 in fact, the value of Mlat1,mlon1 is the same. Here Mlat2,mlon2 is also not a null value. I'm calling in handler in Mainactivity.
Mmapview.getoverlays (). Add (New Myoverlayitem (drawable));
To achieve. Solve, tangled up a day, first thanked.
============ Solution 1============
Refreshes the bottom canvas.
Android Map Real-time tagging