Gold Map Js-api (super simple get new skill √)

Source: Internet
Author: User

In the last few chapters we studied the use of the Baidu Map SDK, although not difficult but the configuration is also quite cumbersome, now the gold LBS open platform launched a map component based on HTML5, we can use the URL by WebView directly to get the request can be achieved location labeling, route planning, Peripheral search function, greatly simplifies our workload, and do not need to import any files, the following for you to introduce.

First step: Apply key

Same as Baidu map still need to apply for a key, but the application process is very simple.

Website: http://lbs.amap.com

1. Enter the name of the application.

2. Select JavaScript API

3. Click to get key

Step Two: Configure URLs

Function 1: Position callout

Example description

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

Parameter description:

:

Function 2: Route planning

Example description

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

Parameter description:

Function 3: Peripheral Search

Example description

Http://m.amap.com/around/?locations=121.442946,37.468676&keywords= Gourmet, KTV, bus stop &defaultIndex=3& Defaultview=map&searchradius=5000&key= (the key you requested)

Parameter description:

:

finally because we are using WebView to load URL , do not forget to join the Access network permissions :

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

It's all over here, isn't it super simple, because it's not only supported by the URL to Android and iOS but also on the PC, so try it.

Jerry Education
Source:http://www.cnblogs.com/jerehedu/
Copyright Notice: The copyright of this article belongs to cigarettes DeskJerry EducationSection Technology Co., Ltd. and blog Park are shared, welcome reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility.
Technical Consultation:

Gold Map Js-api (super simple get new skill √)

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.