1.å®ç°å°ä¸ç»GPS模åè·åçç»çº¬åº¦æ°æ®å¨ç¾åº¦å°å¾ä¸ç»å¶è½¨è¿¹
2.æ åçGPSç»çº¬åº¦åæ ç´æ¥å¨å°å¾ä¸ç»å¶ä¼æå移ï¼è¿æ¯æµç»å±åå°å¾å设置çå å¯ï¼è¦è½¬æ¢æç¾åº¦å°å¾åæ ï¼ä»£ç å¦ä¸
*
* @return ç¾åº¦å°å¾åæ
*/
publicGeoPoint gpsToBaidu(String data) {//dataæ ¼å¼ nmeaæ åæ°æ® ddmm.mmmmm,ddmm.mmmm å¦3030.90909,11449.1234
String[] p = data.split(",");
intlat = (int) (((int) (Float.valueOf(p[0]) /100) + (100* (Float//å°ddmm.mmmmæ ¼å¼è½¬ædd.ddddd
.valueOf(p[0]) /100.0- (int) (Float.valueOf(p[0]) /100)) /60.0)) * 1E6);
intlon = (int) (((int) (Float.valueOf(p[1]) /100) + (100* (Float
.valueOf(p[1]) /100.0- (int) (Float.valueOf(p[1]) /100)) /60.0)) * 1E6);
GeoPoint pt =newGeoPoint(lat, lon);
returnCoordinateConvert.fromWgs84ToBaidu(pt);//转æç¾åº¦åæ
}
温馨提示:答案为网友推荐,仅供参考