Add Baidu map to your website

Source: Internet
Author: User

First, open the diagram generator http://api.map.baidu.com/lbsapi/creatmap/

Second, create a map1. Locate the center point, the default is Beijing, click Switch, enter the company's specific city and specific address. At this point, the map will be switched to the site area. 2. Set the map, which is basically no tube, only with the appropriate settings under the width and height. 3. Add the label, in fact, the site building may not know the exact location of the enterprise, often do not know where the mark. At this time, we can open http://map.baidu.com/, query to the detailed coordinates, labeled up. This flag icon can be changed, according to your favorite to set it. Remember to enter a name and comment after you finish labeling. third, get the codeIt's easy to get the code, click the Yellow button and copy the code directly. four, added to the Web page, there are two ways. 1. Paste separately           you need to put the style and map initialization js paste in two head tags, the map container in two body tags inside, Finally, the remaining map custom JS is placed between the body end tag and the HTML end tag.     you need to refer to the following structure and put the code in the appropriate location on your own page.   method Two, using the IFRAMEYou can save the resulting code in the form of a Web page, and then add a sentence to your own page <iframe width=420 height=330 frameborder=0 scrolling=auto src=url></      iframe> scrolling Indicates whether the page scroll bar is displayed, the optional parameter is auto, yes, no, and if omitted, the default is auto.      Height and width are the heights and widths, respectively.       Frameborder is the width of the edge of this container. For example, you saved a Web page file called mymap.htm, and you want it to be 697 wide and 550 high. No border. The path is plus/mymap.htm. You can write it like this: <iframe width=697 height=550 frameborder=0 scrolling=auto src= "plus/mymap.htm" ></iframe>

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.