Home  >  Article  >  Web Front-end  >  Detailed steps for embedding Baidu maps into web pages and customizing maps using Baidu Map API_HTML/Xhtml_Web page production

Detailed steps for embedding Baidu maps into web pages and customizing maps using Baidu Map API_HTML/Xhtml_Web page production

WBOY
WBOYOriginal
2016-05-16 16:37:551873browse

Insert Baidu map into web page

If you want to add Baidu Map to your web page, you can use Baidu Map’s API. The specific usage method is as follows:

Step one: Enter Baidu’s map creation website http://api.map.baidu.com/lbsapi/creatmap/ and search for the location you want to display, as shown in the picture below.

Step 2: Set the map. You can set the width and height of the map displayed on the website, and leave the other options unchanged.

Step 3: Add annotations. After clicking on the first icon, find your position on the right side and click the left mouse button to locate it. The icon shape can be changed at the marked icon, and the name and remarks can be filled in with location-related information.

Step 4: Get the code. Just paste the code into your web page and you're good to go. The code is as follows:


Copy code
The code is as follows:

http://www.w3 .org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
http://www.w3.org/1999/xhtml">



< ;meta name="description" content="Baidu Map API custom map, helping users generate Baidu maps under visual operations" />
Baidu Map API custom map




Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn