Baidu map API-javascript-web map application,

Source: Internet
Author: User

Baidu map API-javascript-web map application,

Html code

<Div class = "maxwidth"> <div class = "address clearfix"> <div class = "map-box fl"> <div id = "allmap"> </div> </div> <div class = "maptitle fr"> <span> Jianhe Plastic Materials Co., Ltd. </span> <p> Contact person: mr. Hu </p> <p> Email: hudb@pvc123.com </p> <p> contact address: </p> <div class = "qqinline"> <a href = "#"> QQ online consulting </a> </div>/ div> <div class = "mapimg fr">  </div> <div class =" hot ">  </div>

 

Css code

.maxwidth{width:1200px;margin:0px auto;}/*map*/.map-box{background-color:#fff;width:750px;height:538px;border:1px solid #eee;}#allmap{width:730px;height:518px;margin:10px;}span.BMap_Marker label.BMapLabel{border:1px solid #000;border-radius: 3px;}/*map end*/

 

JavaScript code

<Script src = "../js/jquery. min. js"> </script> <script type = "text/javascript" src = "http://api.map.baidu.com/api? Ak = nbAwc69Hb3sgKdGHko1HWhSP & amp; v = 2.0 "> </script> <script type =" text/javascript "> // Baidu map API function var map = new BMap. map ("allmap"); var point = new BMap. point (113.732756, 22.992607); map. centerAndZoom (point, 19); var marker = new BMap. marker (point); // creates a map annotation. addOverlay (marker); // Add the annotation to the map var label = new BMap. label ("Jianhe Plastic Materials Co., Ltd.", {offset: new BMap. size (20,-10)}); label. setStyle ({borderColor: "black"}); // marker. addEventListener ("click", function () {// click the pop-up button to remove the comment marker. setLabel (label); // open the Information Window //}); // click the pop-up button to remove the comment </script>

 

As follows:

 

  Mark:

Baidu map Builder

Http://api.map.baidu.com/lbsapi/creatmap/index.html

Coordinate System for Baidu map picking
Http://api.map.baidu.com/lbsapi/getpoint/index.html

Baidu map JavaScript API
Http://lbsyun.baidu.com/index.php? Title = jspopular

Related Article

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.