Front-end time because the company needs to study Baidu’s tutorials
Then write a simple note to record what you have learned, just to satisfy your temporary writing enthusiasm
AMAP WEB development (key application, api) simple tutorial
1. First we need to go to the "Amap Development Platform"
Through "Baidu search" or "Google search" Amap, there will be an Amap development platform | Amap apl
##2. Log in to the AutoNavi Development Platform
This is the official website of the AutoNavi Development Platform, and then click to log in. Just do not register.3. Enter the console to create a new application
After entering the console, select "Application Management" and click to create a new application. Be sure to remember this step The name and type of the application should be selected according to your actual situation4. The use of key and the use of api
After getting the key, how to use it? As for the German map, of course you have to look at its API You can see it through the development document web-side JavaScript API under "Development and Support" on the homepage The picture above is the api page. This is relatively comprehensive. If you are not familiar with it or don’t know how to call it, let’s take a look directly. His example directly uses code to show how to call The JS API example center in the "Development and Support" examples and experience of the menu Here it is It is very clear. Of course, this is only a partial demonstration. Many classes and methods are not written out. You can go to the API to view the details yourself. However, here is an introduction to the basic use of maps and the calling of various functions5. Use of Gaode map API
Here is a brief introduction to the method of use 1. Gaode map js and css The key required in the fourth line of the call is the key obtained by adding the application just above1基本地图展示 2
1 var map = new AMap.Map('container', { 2 resizeEnable: true, 3 zoom:11, 4 center: [116.397428, 39.90923] 5 });
1 2 36 29
1 2 3 4 19
The above is the detailed content of The latest Amap API WEB development example tutorial. For more information, please follow other related articles on the PHP Chinese website!