Android program calls Google map of Local Machine

Source: Internet
Author: User
Android Program Call the local Google Map, pass the start and end positions, and generate a Roadmap

The android program calls GoogleMap on the local machine, transmits the start and end positions, and generates a Roadmap
The android program calls GoogleMap on the local machine, transmits the start and end positions, and generates a Roadmap

If (wodeweizhipoint! = NULL) {If (wodeweizhipoint. getlatitudee6 ()! = 0) {float chufajingdu = (float) (wodeweizhipoint. getlongitudee6 ()/1e6); float chufaweidu = (float) (wodeweizhipoint. getlatitudee6 ()/1e6); float daodajingdu = (float) (appconstant. pointzuobiao. liangxiangdaohangpoint. getlongitudee6 ()/1e6); float daodaweidu = (float) (appconstant. pointzuobiao. liangxiangdaohangpoint. getlatitudee6 ()/1e6); // mark a vertex // intent I = new // intent (intent. action_view, Uri. P Arse ("http://ditu.google.cn/maps? Hl = ZH & MRT = loc & Q = 31.249351, 121.45905 "); // the route from where intent I = new intent (intent. action_view, Uri. parse ("http://ditu.google.cn/maps? F = D & source = s_d & saddr = "+ chufaweidu +", "+ chufajingdu +" & daddr = "+ daodaweidu + ", "+ daodajingdu +" & HL = ZH "); // if you force the GoogleMap client to open it, add the following two sentences. addflags (intent. flag_activity_new_task & intent. flag_activity_exclude_from_recents); I. setclassname ("com. google. android. apps. maps "," com. google. android. maps. mapsactivity "); startactivity (I) ;}} else {alertutils. toastalert (mcontext, "navigation is unavailable because you cannot obtain your location ");}

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.