AMAP JS-API (super simple Get new skills √), AMAP js-api

Source: Internet
Author: User

AMAP JS-API (super simple Get new skills √), AMAP js-api

In the previous chapters, we have studied the usage of Baidu map SDK. Although it is not difficult to configure it, it is quite complicated. Now, the autonavi LBS open platform has released the HTML5-Based Map component, through WebView, we can directly use a URL for GET requests to Implement Location tagging, route planning, and nearby search functions, which greatly simplifies our workload, you do not need to import any files.

Step 1: Apply for a Key

Like a hundred-degree map, you still need to apply for a Key, but the application process is very simple.

Web: http://lbs.amap.com

1. Enter the application name.

2. Select JavaScript API

3. Click to get the Key

Step 2: configure the URL

Feature 1: Location tagging

Example

Http://m.amap.com/navi? Dest = 121.442946, 37.468676 & destName = Jerry Education & hideRouteIcon = 1 & key = (the key you applied)

Parameter description:

:

Function 2: Route Planning

Example

Http://m.amap.com/navi? Start = 121.442946, 37.468676 & dest = 121.447967, 37.464418 & destName = a driving route & key = (the key you applied)

Parameter description:

Function 3: search nearby

Example

Http://m.amap.com/around? Locations = 121.442946, 37.468676 & keywords = food, KTV, bus stop & defaultIndex = 3 & defaultView = map & searchRadius = 5000 & key = (the key you applied)

Parameter description:

:

Finally, we useWebViewLoadURLDo not forget the permission to join the Network:

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

This is all about it. Isn't it super simple? It's because URL-based access not only supports Android and IOS, but can also be opened on PC. Please try it.

 

Author: Jerry Education
Source: http://www.cnblogs.com/jerehedu/
Copyright Disclaimer: The copyright of this article is shared by Yantai jereh Education Technology Co., Ltd. and the blog Park. You are welcome to repost it. However, you must keep this statement without the consent of the author and provide the original article connection clearly on the article page, otherwise, you are entitled to pursue legal liability.
Technical Consultation:

Related Article

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.