Baidu Map Road Book

Source: Internet
Author: User
Tags polyline

<! DOCTYPE html>"Viewport"Content="initial-scale=1.0, User-scalable=no"/> <meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/> <script type="Text/javascript"Src="http://api.map.baidu.com/api?v=1.4"></script> <script type="Text/javascript"Src="Http://api.map.baidu.com/library/TextIconOverlay/1.2/src/TextIconOverlay_min.js"></script> <script type="Text/javascript"Src="Http://api.map.baidu.com/library/MarkerClusterer/1.2/src/MarkerClusterer_min.js"></script> <script type="Text/javascript"Src="Http://api.map.baidu.com/library/LuShu/1.2/src/LuShu_min.js"></script> <title>25.1Road Books </title>class="wrapper"> <divclass="Container Clearfix"> <divclass="Clearfix"> <div style="Clear:both;"> <div style="Float:left, width:500px, height:340px, border:1px solid gray"Id="Container"> </div> </div> </div> </div> &LT;/DIV&G T;</body>"Text/javascript">varMap =NewBmap.map ("Container");//Create a map    varPoint =NewBmap.point (116.411053,39.950507);//determine the center pointMap.centerandzoom (Point,8);//Initialize map maps, set center point and map level.     varPoint1 =NewBmap.point (117.965625,40.962343);//beginning 1    varPoint2 =NewBmap.point (118.213988,39.609821);//Middle Point 2    varPoint3 =NewBmap.point (117.211335,39.095608);//Middle point 3    varPOINT4 =NewBmap.point (116.723807,39.53863);//Middle Point 4    varPOINT5 =NewBmap.point (116.392656,39.9080114);//Middle Point 5    varPOINT6 =NewBmap.point (115.509585,38.865845);//Middle Point 6    varPOINT7 =NewBmap.point (114.920872,40.829717);//Middle Point 7    varPoint8 =NewBmap.point (117.965625,40.962343);//End 8    varpoints = [Point1, Point2, Point3, Point4, POINT5, Point6, point7, Point8];//polyline Array    varPolyline =NewBmap.polyline (points);//Create PolylineMap.addoverlay (polyline);//Draw a polyline    varLushu =NewBmaplib.lushu (map, points, {defaultcontent:"", AutoView:true,//whether to turn on the automatic field of view adjustment, if the road book in the course of movement will be automatically adjusted according to the field of viewIconNewBmap.icon ('Car.png',NewBmap.size ( the, -), {anchor:NewBmap.size ( -, -)}), Enablerotation:true,//whether to set marker to rotate as the road movesLandmarkpois: []}); Lushu.start (); </script>

Baidu Map Road Book

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.