Import
import com.baidu.mapapi.CoordinateConvert;
import com.baidu.mapapi.GeoPoint;
Code
GeoPoint p = new GeoPoint(x, y);
GeoPoint p2 = CoordinateConvert.bundleDecode(CoordinateConvert.fromWgs84ToBaidu(p));
其变量p为从GPS直接读到的点,p2为在在地图上显示的点;
Import
import com.baidu.mapapi.CoordinateConvert;
import com.baidu.mapapi.GeoPoint;
Code
GeoPoint p = new GeoPoint(x, y);
GeoPoint p2 = CoordinateConvert.bundleDecode(CoordinateConvert.fromWgs84ToBaidu(p));
其变量p为从GPS直接读到的点,p2为在在地图上显示的点;
转载于:https://www.cnblogs.com/datous/archive/2011/12/30/2307688.html