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: