Android uses Baidu lbs sdk (2) and androidlbs
Article 1: Android uses Baidu lbs sdk (which implements basic use of Baidu maps, records tracks, optimizes track smoothness, and views and shares tracks .)
Today I will summarize the usage of ranging and speed measurement:
Calculates the linear distance and route distance from the trajectory start point.
Code:
// Linear distance from double linearDistance = DistanceUtil. getDistance (llStart, llEnd); // The trajectory distance from double routeDistance = 0.0; for (int I = 0; I <points. size ()-1; I ++) {routeDistance = routeDistance + DistanceUtil. getDistance (points. get (I), points. get (I + 1 ));}
:
Remove the MapView scaling control and Baidu Logo
Code:
MMapView = (MapView) findViewById (R. id. routeMap); // remove the scaling control and Baidu Logo int count = mMapView. getChildCount (); for (int I = 0; I <count; I ++) {View child = mMapView. getChildAt (I); if (child instanceof ImageView | child instanceof ZoomControls) {child. setVisibility (View. INVISIBLE );}}
Write so much first, and then add it later.
I am here: CSDN GitHub Weibo