Recently, Baidu map needs to be used in combination. The need is to establish a walking link between multiple points on the map. Baidu provides a walking path between two points and coordinate points along the map; the preliminary idea is to first draw the walking path of each point, then get the coordinate information set of the line, and then re-draw the complete line through another line interface of Baidu map;
If you are not familiar with Baidu map APIs, refer to http://developer.51cto.com/art/201110/298662.htmfor details;
Baidu map API developer address: http://developer.baidu.com/map/jshome.htm
1. Implement the required functions by combining the following two Baidu instances;
1: two walking examples: http://developer.baidu.com/map/jsdemo.htm#i6_1
<HTML>
2: Line instance: http://developer.baidu.com/map/jsdemo.htm#c1_5
<Head> <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8 "/> <meta name =" viewport "content =" Initial-scale = 1.0, user-scalable = No "/> <style type =" text/CSS "> body, HTML, # allmap {width: 100%; Height: 100%; overflow: hidden; margin: 0 ;}</style> <SCRIPT type = "text/JavaScript" src = "http://api.map.baidu.com/api? V = 2.0 & aK = your key "> </SCRIPT> <title> line </title>
2. connect to an instance through a multi-point walking path (the complete code is as follows, with corresponding instructions. The instance defines three points)
<HTML xmlns = "http://www.w3.org/1999/xhtml">
The left side is the three-point Link Map displayed by the walking interface. The start and end points are identified between the two points. Therefore, if there are multiple points on the map, a marker indicating the start and end points appears; on the right is the modified map;