Android uses Baidu lbs sdk (2) and androidlbs

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.