Android Baidu coordinates to Gaode

Record the conversion of Baidu coordinates to Gaode.

LatLng sourceLatLng = new LatLng(vBean.getLat(), vBean.getLng());

CoordinateConverter converter = new CoordinateConverter();
 // Coordinate type converter to be converted
 .from(CoordinateConverter.CoordType. BAIDU );
 // sourceLatLng Coordinate point to be converted LatLng type
 converter .coord(sourceLatLng);
 // Perform conversion operation
 LatLng desLatLng = converter .convert();
 lat = desLatLng.latitude ;
 lng = desLatLng.longitude ;

Guess you like

Origin blog.csdn.net/qq_34475640/article/details/80047017