一个百度地图API应用实例

 2023-09-05 阅读 122 评论 0

摘要:实现的功能有:导航、行政规划、定位、卫星/三维地图、地图标记、计算到达时间等等。 <html> <head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><meta name="viewport" con

实现的功能有:导航、行政规划、定位、卫星/三维地图、地图标记、计算到达时间等等。

<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><meta name="viewport" content="initial-scale=1.0, user-scalable=no" /><style type="text/css">body, html {width: 100%;height: 100%;margin:0;font-family:"微软雅黑";}#allmap{width:100%;height:680px;}table{margin-left:5px; font-size:14px;}#r-result,#r-result table{width:100%;}a:link,a:visited{text-decoration:none;  /*超链接无下划线*/}a:hover{text-decoration:underline;  /*鼠标放上去有下划线*/}</style><script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=sSelQoVi2L3KofLo1HOobonW"></script><title>基于百度API的贵州省贵阳市电子旅游地图</title>
</head>
<body>
<marquee scrollamount="5" scrolldelay="95" bgcolor="#FFFOAC">基于百度API的贵州省贵阳市电子旅游地图的开发 gznc_pcc制作</marquee><br><div id="allmap"></div><div id="driving_way"><table border="0"><tr></tr><tr><td align="left">&nbsp;&nbsp;&nbsp;&nbsp;起点:</td><td><select name="begin" id="begin" style="width:120px;" size=1> <option value="贵阳北站" selected="selected">贵阳北站</option> <option value="贵阳火车站">贵阳火车站</option> <option value="金阳客车站">金阳客车站</option> <option value="龙洞堡机场">龙洞堡机场</option> <option value="青岩古镇">青岩古镇</option><option value="黔灵山公园">黔灵山公园</option><option value="花溪公园">花溪公园</option><option value="森林公园">森林公园</option> <option value="花果园湿地公园">花果园湿地公园</option> <option value="观山湖公园">观山湖公园</option><option value="河滨公园">河滨公园</option> <option value="遵义会议会址">遵义会议会址</option> <option value="娄山关">娄山关</option> <option value="佛光岩景区">佛光岩景区</option> <option value="金鼎山">金鼎山</option> <option value="赤水瀑布">赤水瀑布</option>  <option value="黄果树瀑布景区">黄果树瀑布景区</option><option value="龙宫风景名胜区">龙宫风景名胜区</option> <option value="格凸河风景区">格凸河风景区</option> <option value="夜郎洞景区">夜郎洞景区</option> <option value="西江千户苗寨">西江千户苗寨</option> <option value="杉木河">杉木河</option> <option value="南江大峡谷">南江大峡谷</option> <option value="息烽集中营革命历史纪念馆">息烽集中营革命历史纪念馆</option></select>  </td><td align="left">&nbsp;&nbsp;终点:</td><td><select name="end" id="end" style="width:125px;" size=1> <option value="青岩古镇">青岩古镇</option><option value="黔灵山公园">黔灵山公园</option> <option value="南江大峡谷">南江大峡谷</option> <option value="花溪公园">花溪公园</option> <option value="森林公园">森林公园</option> <option value="花果园湿地公园">花果园湿地公园</option> <option value="河滨公园" selected="selected" >河滨公园</option> <option value="息烽集中营革命历史纪念馆">息烽集中营革命历史纪念馆</option><option value="观山湖公园">观山湖公园</option><option value="遵义会议会址">遵义会议会址</option> <option value="娄山关">娄山关</option> <option value="佛光岩景区">佛光岩景区</option> <option value="金鼎山">金鼎山</option> <option value="赤水瀑布">赤水瀑布</option>  <option value="黄果树瀑布景区">黄果树瀑布景区</option><option value="龙宫风景名胜区">龙宫风景名胜区</option> <option value="格凸河风景区">格凸河风景区</option> <option value="夜郎洞景区">夜郎洞景区</option> <option value="西江千户苗寨">西江千户苗寨</option> <option value="杉木河">杉木河</option> </select></td><td align="left">&nbsp;&nbsp;方式:</td><td><select name="s1" id="s1"><option value="1" selected="selected">公交车</option><option value="2">自驾游</option></select></td><td align="left">&nbsp;&nbsp;要求:</td><td><select id="s2" name="s2" style="width:125px;" ><option value="0">最少时间</option><option value="1">最少换乘</option><option value="2">最少步行</option><option value="3">不乘地铁</option></select></td><td>&nbsp;&nbsp;</td><td><input type="button" id="result" onclick="run();" value="查&nbsp;询"/></td><td>&nbsp;&nbsp;</td><td><input type="button" id="plan" onclick="plan();" value="行政规划"/></td><td>&nbsp;&nbsp;</td><td><input type="button" id="myfun" onclick="myfun();" value="我的位置"/></td><td>&nbsp;&nbsp;</td><td style="width:100px;"></td><td><a href="javascript:location.reload();" style="color:#0000ff0; font-size:22px;">基于百度API的贵州省贵阳市电子旅游地图</a></td></tr></table></div><div id="r-result"></div>
</body>
</html>
<script type="text/javascript">// 百度地图API功能var map = new BMap.Map("allmap");     // 创建Map实例//map.centerAndZoom(new BMap.Point(106.63 , 26.65), 11);// 初始化地图,设置中心点坐标和地图级别map.centerAndZoom("贵阳",15);  map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放map.setCurrentCity("贵阳");          // 设置地图显示的城市map.addControl(new BMap.ScaleControl());    //添加左下方比例尺控件map.addControl(new BMap.MapTypeControl()); //添加地图切换控件map.setMaxZoom(20);//设置地图允许的最大级别map.setMinZoom(12);//设置地图允许的最小级别var top_left_control = new BMap.ScaleControl({anchor: BMAP_ANCHOR_TOP_LEFT});// 左上角,添加比例尺var top_left_navigation = new BMap.NavigationControl();  //左上角,添加默认缩放平移控件var top_right_navigation = new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_RIGHT, type: BMAP_NAVIGATION_CONTROL_SMALL}); //右上角,仅包含平移和缩放按钮/*缩放控件type有四种类型:BMAP_NAVIGATION_CONTROL_SMALL:仅包含平移和缩放按钮;BMAP_NAVIGATION_CONTROL_PAN:仅包含平移按钮;BMAP_NAVIGATION_CONTROL_ZOOM:仅包含缩放按钮*///添加控件和比例尺map.addControl(top_left_control);        map.addControl(top_left_navigation);     //map.addControl(top_right_navigation);    var local = new BMap.LocalSearch(map, {renderOptions:{map: map}});local.search("景点");//实现驾车线路规划和公交路线
window.run = function (){var myselect=document.getElementById("begin");var value1 = myselect[myselect.selectedIndex].value;myselect=document.getElementById("end");var value2 = myselect[myselect.selectedIndex].value;myselect=document.getElementById("s1");var value3 = myselect[myselect.selectedIndex].value;myselect=document.getElementById("s2");var value4 = myselect[myselect.selectedIndex].value;//如果起点和终点相同则提示用户if(value1 == value2){alert("起点和终点不能相同,请重新选择!"); return;}if(value3==1){ //选择公交路线var start = value1; //起点var end = value2; //终点var routePolicy = [BMAP_TRANSIT_POLICY_LEAST_TIME,BMAP_TRANSIT_POLICY_LEAST_TRANSFER,BMAP_TRANSIT_POLICY_LEAST_WALKING,BMAP_TRANSIT_POLICY_AVOID_SUBWAYS];var transit = new BMap.TransitRoute(map, {renderOptions: {map: map},policy: 0});map.clearOverlays();var i = value4;  //根据要求选择search(start,end,routePolicy[i]); function search(start,end,route){ transit.setPolicy(route);transit.search(start,end);}//公交换乘的时间和距离var output = "从"+ value1 +"到"+ value2 +"坐公交需要";var searchComplete = function (results){if (transit.getStatus() != BMAP_STATUS_SUCCESS){return ;}var plan = results.getPlan(0);output += plan.getDuration(true) + "\n";  //获取时间output += plan.getDistance(true) + "\n";  //获取距离}var transit = new BMap.TransitRoute(map, {renderOptions: {map: map},onSearchComplete: searchComplete,onPolylinesSet: function(){        setTimeout(function(){alert(output)},"1000");}});transit.search(value1, value2); }if(value3==2){var start = new BMap.Point(106.681438,26.625919);    //起点-贵阳北站var end = new BMap.Point(106.694797,26.336564);    //终点-青岩古镇    //以贵阳火车站为起点if(value1 == "贵阳火车站" && value2 == "青岩古镇"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.694797,26.336564);}   if(value1 == "贵阳火车站" && value2 == "黔灵山公园"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.699875,26.607748);}if(value1 == "贵阳火车站" && value2 == "南江大峡谷"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.977224,26.946632);}if(value1 == "贵阳火车站" && value2 == "花溪公园"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.678623,26.439248);}   if(value1 == "贵阳火车站" && value2 == "森林公园"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.766015,26.558275);}if(value1 == "贵阳火车站" && value2 == "花果园湿地公园"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.693124,26.571652);}if(value1 == "贵阳火车站" && value2 == "河滨公园"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.712242,26.574096);}if(value1 == "贵阳火车站" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.748007,27.046644);}if(value1 == "贵阳火车站" && value2 == "观山湖公园"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.641329,26.64611);}if(value1 == "贵阳火车站" && value2 == "遵义会议会址"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.927169,27.694728);}if(value1 == "贵阳火车站" && value2 == "娄山关"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.86388,28.027502);}if(value1 == "贵阳火车站" && value2 == "佛光岩景区"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(105.975946,28.395717);}if(value1 == "贵阳火车站" && value2 == "金鼎山"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.807694,27.741795);}if(value1 == "贵阳火车站" && value2 == "赤水瀑布"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(105.752489,28.380818);}if(value1 == "贵阳火车站" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(105.679142,25.985778);}if(value1 == "贵阳火车站" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(105.895188,26.098335);}if(value1 == "贵阳火车站" && value2 == "格凸河风景区"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(106.270015,25.682332);}if(value1 == "贵阳火车站" && value2 == "夜郎洞景区"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(105.638087,26.093807);}if(value1 == "贵阳火车站" && value2 == "西江千户苗寨"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(108.18029,26.500009);}if(value1 == "贵阳火车站" && value2 == "杉木河"){start = new BMap.Point(106.70959,26.562968);end = new BMap.Point(108.07022,27.117814);}//以贵阳北站为起点if(value1 == "贵阳北站" && value2 == "青岩古镇"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.694797,26.336564);}  if(value1 == "贵阳北站" && value2 == "黔灵山公园"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.699875,26.607748);}if(value1 == "贵阳北站" && value2 == "南江大峡谷"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.977224,26.946632);}if(value1 == "贵阳北站" && value2 == "花溪公园"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.678623,26.439248);}    if(value1 == "贵阳北站" && value2 == "森林公园"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.766015,26.558275);}if(value1 == "贵阳北站" && value2 == "花果园湿地公园"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.693124,26.571652);}if(value1 == "贵阳北站" && value2 == "河滨公园"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.712242,26.574096);}if(value1 == "贵阳北站" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.748007,27.046644);}if(value1 == "贵阳北站" && value2 == "观山湖公园"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.641329,26.64611);}if(value1 == "贵阳北站" && value2 == "遵义会议会址"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.927169,27.694728);}if(value1 == "贵阳北站" && value2 == "娄山关"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.86388,28.027502);}if(value1 == "贵阳北站" && value2 == "佛光岩景区"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(105.975946,28.395717);}if(value1 == "贵阳北站" && value2 == "金鼎山"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.807694,27.741795);}if(value1 == "贵阳北站" && value2 == "赤水瀑布"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(105.752489,28.380818);}if(value1 == "贵阳北站" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(105.679142,25.985778);}if(value1 == "贵阳北站" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(105.895188,26.098335);}if(value1 == "贵阳北站" && value2 == "格凸河风景区"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(106.270015,25.682332);}if(value1 == "贵阳北站" && value2 == "夜郎洞景区"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(105.638087,26.093807);}if(value1 == "贵阳北站" && value2 == "西江千户苗寨"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(108.18029,26.500009);}if(value1 == "贵阳北站" && value2 == "杉木河"){start = new BMap.Point(106.681438,26.625919);end = new BMap.Point(108.07022,27.117814);}//以金阳客车站为起点if(value1 == "金阳客车站" && value2 == "青岩古镇"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.694797,26.336564);} if(value1 == "金阳客车站" && value2 == "黔灵山公园"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.699875,26.607748);}if(value1 == "金阳客车站" && value2 == "南江大峡谷"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.977224,26.946632);}if(value1 == "金阳客车站" && value2 == "花溪公园"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.678623,26.439248);} if(value1 == "金阳客车站" && value2 == "森林公园"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.766015,26.558275);}if(value1 == "金阳客车站" && value2 == "花果园湿地公园"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.693124,26.571652);}if(value1 == "金阳客车站" && value2 == "河滨公园"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.712242,26.574096);}if(value1 == "金阳客车站" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.748007,27.046644);}if(value1 == "金阳客车站" && value2 == "观山湖公园"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.641329,26.64611);}if(value1 == "金阳客车站" && value2 == "遵义会议会址"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.927169,27.694728);}if(value1 == "金阳客车站" && value2 == "娄山关"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.86388,28.027502);}if(value1 == "金阳客车站" && value2 == "佛光岩景区"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(105.975946,28.395717);}if(value1 == "金阳客车站" && value2 == "金鼎山"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.807694,27.741795);}if(value1 == "金阳客车站" && value2 == "赤水瀑布"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(105.752489,28.380818);}if(value1 == "金阳客车站" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(105.679142,25.985778);}if(value1 == "金阳客车站" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(105.895188,26.098335);}if(value1 == "金阳客车站" && value2 == "格凸河风景区"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(106.270015,25.682332);}if(value1 == "金阳客车站" && value2 == "夜郎洞景区"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(105.638087,26.093807);}if(value1 == "金阳客车站" && value2 == "西江千户苗寨"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(108.18029,26.500009);}if(value1 == "金阳客车站" && value2 == "杉木河"){start = new BMap.Point(106.628888,26.626053);end = new BMap.Point(108.07022,27.117814);}//以龙洞堡机场为起点if(value1 == "龙洞堡机场" && value2 == "青岩古镇"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.694797,26.336564);} if(value1 == "龙洞堡机场" && value2 == "黔灵山公园"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.699875,26.607748);}if(value1 == "龙洞堡机场" && value2 == "南江大峡谷"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.977224,26.946632);}if(value1 == "龙洞堡机场" && value2 == "花溪公园"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.678623,26.439248);} if(value1 == "龙洞堡机场" && value2 == "森林公园"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.766015,26.558275);}if(value1 == "龙洞堡机场" && value2 == "花果园湿地公园"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.693124,26.571652);}if(value1 == "龙洞堡机场" && value2 == "河滨公园"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.712242,26.574096);}if(value1 == "龙洞堡机场" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.748007,27.046644);}if(value1 == "龙洞堡机场" && value2 == "观山湖公园"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.641329,26.64611);}if(value1 == "龙洞堡机场" && value2 == "遵义会议会址"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.927169,27.694728);}if(value1 == "龙洞堡机场" && value2 == "娄山关"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.86388,28.027502);}if(value1 == "龙洞堡机场" && value2 == "佛光岩景区"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(105.975946,28.395717);}if(value1 == "龙洞堡机场" && value2 == "金鼎山"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.807694,27.741795);}if(value1 == "龙洞堡机场" && value2 == "赤水瀑布"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(105.752489,28.380818);}if(value1 == "龙洞堡机场" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(105.679142,25.985778);}if(value1 == "龙洞堡机场" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(105.895188,26.098335);}if(value1 == "龙洞堡机场" && value2 == "格凸河风景区"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(106.270015,25.682332);}if(value1 == "龙洞堡机场" && value2 == "夜郎洞景区"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(105.638087,26.093807);}if(value1 == "龙洞堡机场" && value2 == "西江千户苗寨"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(108.18029,26.500009);}if(value1 == "龙洞堡机场" && value2 == "杉木河"){start = new BMap.Point(106.804843,26.546889);end = new BMap.Point(108.07022,27.117814);}//以青岩古镇为起点if(value1 == "青岩古镇" && value2 == "黔灵山公园"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.699875,26.607748);}if(value1 == "青岩古镇" && value2 == "南江大峡谷"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.977224,26.946632);}if(value1 == "青岩古镇" && value2 == "花溪公园"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.678623,26.439248);}    if(value1 == "青岩古镇" && value2 == "森林公园"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.766015,26.558275);}if(value1 == "青岩古镇" && value2 == "花果园湿地公园"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.693124,26.571652);}if(value1 == "青岩古镇" && value2 == "河滨公园"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.712242,26.574096);}if(value1 == "青岩古镇" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.748007,27.046644);}if(value1 == "青岩古镇" && value2 == "观山湖公园"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.641329,26.64611);}if(value1 == "青岩古镇" && value2 == "遵义会议会址"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.927169,27.694728);}if(value1 == "青岩古镇" && value2 == "娄山关"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.86388,28.027502);}if(value1 == "青岩古镇" && value2 == "佛光岩景区"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(105.975946,28.395717);}if(value1 == "青岩古镇" && value2 == "金鼎山"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.807694,27.741795);}if(value1 == "青岩古镇" && value2 == "赤水瀑布"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(105.752489,28.380818);}if(value1 == "青岩古镇" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(105.679142,25.985778);}if(value1 == "青岩古镇" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(105.895188,26.098335);}if(value1 == "青岩古镇" && value2 == "格凸河风景区"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(106.270015,25.682332);}if(value1 == "青岩古镇" && value2 == "夜郎洞景区"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(105.638087,26.093807);}if(value1 == "青岩古镇" && value2 == "西江千户苗寨"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(108.18029,26.500009);}if(value1 == "青岩古镇" && value2 == "杉木河"){start = new BMap.Point(106.694797,26.336564);end = new BMap.Point(108.07022,27.117814);}//以黔灵山公园为起点if(value1 == "黔灵山公园" && value2 == "青岩古镇"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.694797,26.336564);} if(value1 == "黔灵山公园" && value2 == "黔灵山公园"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.699875,26.607748);}if(value1 == "黔灵山公园" && value2 == "南江大峡谷"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.977224,26.946632);}if(value1 == "黔灵山公园" && value2 == "花溪公园"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.678623,26.439248);} if(value1 == "黔灵山公园" && value2 == "森林公园"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.766015,26.558275);}if(value1 == "黔灵山公园" && value2 == "花果园湿地公园"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.693124,26.571652);}if(value1 == "黔灵山公园" && value2 == "河滨公园"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.712242,26.574096);}if(value1 == "黔灵山公园" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.748007,27.046644);}if(value1 == "黔灵山公园" && value2 == "观山湖公园"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.641329,26.64611);}if(value1 == "黔灵山公园" && value2 == "遵义会议会址"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.927169,27.694728);}if(value1 == "黔灵山公园" && value2 == "娄山关"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.86388,28.027502);}if(value1 == "黔灵山公园" && value2 == "佛光岩景区"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(105.975946,28.395717);}if(value1 == "黔灵山公园" && value2 == "金鼎山"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.807694,27.741795);}if(value1 == "黔灵山公园" && value2 == "赤水瀑布"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(105.752489,28.380818);}if(value1 == "黔灵山公园" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(105.679142,25.985778);}if(value1 == "黔灵山公园" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(105.895188,26.098335);}if(value1 == "黔灵山公园" && value2 == "格凸河风景区"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(106.270015,25.682332);}if(value1 == "黔灵山公园" && value2 == "夜郎洞景区"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(105.638087,26.093807);}if(value1 == "黔灵山公园" && value2 == "西江千户苗寨"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(108.18029,26.500009);}if(value1 == "黔灵山公园" && value2 == "杉木河"){start = new BMap.Point(106.699875,26.607748);end = new BMap.Point(108.07022,27.117814);}//以南江大峡谷为起点if(value1 == "南江大峡谷" && value2 == "青岩古镇"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.694797,26.336564);} if(value1 == "南江大峡谷" && value2 == "黔灵山公园"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.699875,26.607748);}if(value1 == "南江大峡谷" && value2 == "南江大峡谷"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.977224,26.946632);}if(value1 == "南江大峡谷" && value2 == "花溪公园"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.678623,26.439248);} if(value1 == "南江大峡谷" && value2 == "森林公园"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.766015,26.558275);}if(value1 == "南江大峡谷" && value2 == "花果园湿地公园"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.693124,26.571652);}if(value1 == "南江大峡谷" && value2 == "河滨公园"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.712242,26.574096);}if(value1 == "南江大峡谷" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.748007,27.046644);}if(value1 == "南江大峡谷" && value2 == "观山湖公园"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.641329,26.64611);}if(value1 == "南江大峡谷" && value2 == "遵义会议会址"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.927169,27.694728);}if(value1 == "南江大峡谷" && value2 == "娄山关"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.86388,28.027502);}if(value1 == "南江大峡谷" && value2 == "佛光岩景区"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(105.975946,28.395717);}if(value1 == "南江大峡谷" && value2 == "金鼎山"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.807694,27.741795);}if(value1 == "南江大峡谷" && value2 == "赤水瀑布"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(105.752489,28.380818);}if(value1 == "南江大峡谷" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(105.679142,25.985778);}if(value1 == "南江大峡谷" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(105.895188,26.098335);}if(value1 == "南江大峡谷" && value2 == "格凸河风景区"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(106.270015,25.682332);}if(value1 == "南江大峡谷" && value2 == "夜郎洞景区"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(105.638087,26.093807);}if(value1 == "南江大峡谷" && value2 == "西江千户苗寨"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(108.18029,26.500009);}if(value1 == "南江大峡谷" && value2 == "杉木河"){start = new BMap.Point(106.977224,26.946632);end = new BMap.Point(108.07022,27.117814);}//以花溪公园为起点if(value1 == "花溪公园" && value2 == "青岩古镇"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.694797,26.336564);}  if(value1 == "花溪公园" && value2 == "黔灵山公园"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.699875,26.607748);}if(value1 == "花溪公园" && value2 == "南江大峡谷"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.977224,26.946632);}if(value1 == "花溪公园" && value2 == "花溪公园"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.678623,26.439248);}    if(value1 == "花溪公园" && value2 == "森林公园"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.766015,26.558275);}if(value1 == "花溪公园" && value2 == "花果园湿地公园"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.693124,26.571652);}if(value1 == "花溪公园" && value2 == "河滨公园"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.712242,26.574096);}if(value1 == "花溪公园" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.748007,27.046644);}if(value1 == "花溪公园" && value2 == "观山湖公园"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.641329,26.64611);}if(value1 == "花溪公园" && value2 == "遵义会议会址"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.927169,27.694728);}if(value1 == "花溪公园" && value2 == "娄山关"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.86388,28.027502);}if(value1 == "花溪公园" && value2 == "佛光岩景区"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(105.975946,28.395717);}if(value1 == "花溪公园" && value2 == "金鼎山"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.807694,27.741795);}if(value1 == "花溪公园" && value2 == "赤水瀑布"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(105.752489,28.380818);}if(value1 == "花溪公园" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(105.679142,25.985778);}if(value1 == "花溪公园" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(105.895188,26.098335);}if(value1 == "花溪公园" && value2 == "格凸河风景区"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(106.270015,25.682332);}if(value1 == "花溪公园" && value2 == "夜郎洞景区"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(105.638087,26.093807);}if(value1 == "花溪公园" && value2 == "西江千户苗寨"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(108.18029,26.500009);}if(value1 == "花溪公园" && value2 == "杉木河"){start = new BMap.Point(106.678623,26.439248);end = new BMap.Point(108.07022,27.117814);}//以森林公园为起点if(value1 == "森林公园" && value2 == "青岩古镇"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.694797,26.336564);}  if(value1 == "森林公园" && value2 == "黔灵山公园"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.699875,26.607748);}if(value1 == "森林公园" && value2 == "南江大峡谷"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.977224,26.946632);}if(value1 == "森林公园" && value2 == "花溪公园"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.678623,26.439248);}    if(value1 == "森林公园" && value2 == "森林公园"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.766015,26.558275);}if(value1 == "森林公园" && value2 == "花果园湿地公园"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.693124,26.571652);}if(value1 == "森林公园" && value2 == "河滨公园"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.712242,26.574096);}if(value1 == "森林公园" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.748007,27.046644);}if(value1 == "森林公园" && value2 == "观山湖公园"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.641329,26.64611);}if(value1 == "森林公园" && value2 == "遵义会议会址"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.927169,27.694728);}if(value1 == "森林公园" && value2 == "娄山关"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.86388,28.027502);}if(value1 == "森林公园" && value2 == "佛光岩景区"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(105.975946,28.395717);}if(value1 == "森林公园" && value2 == "金鼎山"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.807694,27.741795);}if(value1 == "森林公园" && value2 == "赤水瀑布"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(105.752489,28.380818);}if(value1 == "森林公园" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(105.679142,25.985778);}if(value1 == "森林公园" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(105.895188,26.098335);}if(value1 == "森林公园" && value2 == "格凸河风景区"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(106.270015,25.682332);}if(value1 == "森林公园" && value2 == "夜郎洞景区"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(105.638087,26.093807);}if(value1 == "森林公园" && value2 == "西江千户苗寨"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(108.18029,26.500009);}if(value1 == "森林公园" && value2 == "杉木河"){start = new BMap.Point(106.766015,26.558275);end = new BMap.Point(108.07022,27.117814);}//以花果园湿地公园为起点if(value1 == "花果园湿地公园" && value2 == "青岩古镇"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.694797,26.336564);}   if(value1 == "花果园湿地公园" && value2 == "黔灵山公园"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.699875,26.607748);}if(value1 == "花果园湿地公园" && value2 == "南江大峡谷"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.977224,26.946632);}if(value1 == "花果园湿地公园" && value2 == "花溪公园"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.678623,26.439248);}   if(value1 == "花果园湿地公园" && value2 == "森林公园"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.766015,26.558275);}if(value1 == "花果园湿地公园" && value2 == "花果园湿地公园"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.693124,26.571652);}if(value1 == "花果园湿地公园" && value2 == "河滨公园"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.712242,26.574096);}if(value1 == "花果园湿地公园" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.748007,27.046644);}if(value1 == "花果园湿地公园" && value2 == "观山湖公园"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.641329,26.64611);}if(value1 == "花果园湿地公园" && value2 == "遵义会议会址"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.927169,27.694728);}if(value1 == "花果园湿地公园" && value2 == "娄山关"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.86388,28.027502);}if(value1 == "花果园湿地公园" && value2 == "佛光岩景区"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(105.975946,28.395717);}if(value1 == "花果园湿地公园" && value2 == "金鼎山"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.807694,27.741795);}if(value1 == "花果园湿地公园" && value2 == "赤水瀑布"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(105.752489,28.380818);}if(value1 == "花果园湿地公园" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(105.679142,25.985778);}if(value1 == "花果园湿地公园" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(105.895188,26.098335);}if(value1 == "花果园湿地公园" && value2 == "格凸河风景区"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(106.270015,25.682332);}if(value1 == "花果园湿地公园" && value2 == "夜郎洞景区"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(105.638087,26.093807);}if(value1 == "花果园湿地公园" && value2 == "西江千户苗寨"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(108.18029,26.500009);}if(value1 == "花果园湿地公园" && value2 == "杉木河"){start = new BMap.Point(106.693124,26.571652);end = new BMap.Point(108.07022,27.117814);}//以河滨公园为起点if(value1 == "河滨公园" && value2 == "青岩古镇"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.694797,26.336564);}  if(value1 == "河滨公园" && value2 == "黔灵山公园"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.699875,26.607748);}if(value1 == "河滨公园" && value2 == "南江大峡谷"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.977224,26.946632);}if(value1 == "河滨公园" && value2 == "花溪公园"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.678623,26.439248);}    if(value1 == "河滨公园" && value2 == "森林公园"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.766015,26.558275);}if(value1 == "河滨公园" && value2 == "花果园湿地公园"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.693124,26.571652);}if(value1 == "河滨公园" && value2 == "河滨公园"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.712242,26.574096);}if(value1 == "河滨公园" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.748007,27.046644);}if(value1 == "河滨公园" && value2 == "观山湖公园"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.641329,26.64611);}if(value1 == "河滨公园" && value2 == "遵义会议会址"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.927169,27.694728);}if(value1 == "河滨公园" && value2 == "娄山关"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.86388,28.027502);}if(value1 == "河滨公园" && value2 == "佛光岩景区"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(105.975946,28.395717);}if(value1 == "河滨公园" && value2 == "金鼎山"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.807694,27.741795);}if(value1 == "河滨公园" && value2 == "赤水瀑布"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(105.752489,28.380818);}if(value1 == "河滨公园" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(105.679142,25.985778);}if(value1 == "河滨公园" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(105.895188,26.098335);}if(value1 == "河滨公园" && value2 == "格凸河风景区"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(106.270015,25.682332);}if(value1 == "河滨公园" && value2 == "夜郎洞景区"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(105.638087,26.093807);}if(value1 == "河滨公园" && value2 == "西江千户苗寨"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(108.18029,26.500009);}if(value1 == "河滨公园" && value2 == "杉木河"){start = new BMap.Point(106.712242,26.574096);end = new BMap.Point(108.07022,27.117814);}//以息烽集中营革命历史纪念馆为起点if(value1 == "息烽集中营革命历史纪念馆" && value2 == "青岩古镇"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.694797,26.336564);}  if(value1 == "息烽集中营革命历史纪念馆" && value2 == "黔灵山公园"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.699875,26.607748);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "南江大峡谷"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.977224,26.946632);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "花溪公园"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.678623,26.439248);}    if(value1 == "息烽集中营革命历史纪念馆" && value2 == "森林公园"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.766015,26.558275);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "花果园湿地公园"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.693124,26.571652);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "河滨公园"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.712242,26.574096);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.748007,27.046644);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "观山湖公园"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.641329,26.64611);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "遵义会议会址"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.927169,27.694728);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "娄山关"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.86388,28.027502);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "佛光岩景区"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(105.975946,28.395717);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "金鼎山"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.807694,27.741795);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "赤水瀑布"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(105.752489,28.380818);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(105.679142,25.985778);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(105.895188,26.098335);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "格凸河风景区"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(106.270015,25.682332);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "夜郎洞景区"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(105.638087,26.093807);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "西江千户苗寨"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(108.18029,26.500009);}if(value1 == "息烽集中营革命历史纪念馆" && value2 == "杉木河"){start = new BMap.Point(106.748007,27.046644);end = new BMap.Point(108.07022,27.117814);}//以观山湖公园为起点if(value1 == "观山湖公园" && value2 == "青岩古镇"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.694797,26.336564);}  if(value1 == "观山湖公园" && value2 == "黔灵山公园"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.699875,26.607748);}if(value1 == "观山湖公园" && value2 == "南江大峡谷"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.977224,26.946632);}if(value1 == "观山湖公园" && value2 == "花溪公园"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.678623,26.439248);}    if(value1 == "观山湖公园" && value2 == "森林公园"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.766015,26.558275);}if(value1 == "观山湖公园" && value2 == "花果园湿地公园"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.693124,26.571652);}if(value1 == "观山湖公园" && value2 == "河滨公园"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.712242,26.574096);}if(value1 == "观山湖公园" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.748007,27.046644);}if(value1 == "观山湖公园" && value2 == "观山湖公园"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.641329,26.64611);}if(value1 == "观山湖公园" && value2 == "遵义会议会址"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.927169,27.694728);}if(value1 == "观山湖公园" && value2 == "娄山关"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.86388,28.027502);}if(value1 == "观山湖公园" && value2 == "佛光岩景区"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(105.975946,28.395717);}if(value1 == "观山湖公园" && value2 == "金鼎山"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.807694,27.741795);}if(value1 == "观山湖公园" && value2 == "赤水瀑布"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(105.752489,28.380818);}if(value1 == "观山湖公园" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(105.679142,25.985778);}if(value1 == "观山湖公园" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(105.895188,26.098335);}if(value1 == "观山湖公园" && value2 == "格凸河风景区"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(106.270015,25.682332);}if(value1 == "观山湖公园" && value2 == "夜郎洞景区"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(105.638087,26.093807);}if(value1 == "观山湖公园" && value2 == "西江千户苗寨"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(108.18029,26.500009);}if(value1 == "观山湖公园" && value2 == "杉木河"){start = new BMap.Point(106.641329,26.64611);end = new BMap.Point(108.07022,27.117814);}//以遵义会议会址为起点if(value1 == "遵义会议会址" && value2 == "青岩古镇"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.694797,26.336564);}    if(value1 == "遵义会议会址" && value2 == "黔灵山公园"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.699875,26.607748);}if(value1 == "遵义会议会址" && value2 == "南江大峡谷"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.977224,26.946632);}if(value1 == "遵义会议会址" && value2 == "花溪公园"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.678623,26.439248);}  if(value1 == "遵义会议会址" && value2 == "森林公园"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.766015,26.558275);}if(value1 == "遵义会议会址" && value2 == "花果园湿地公园"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.693124,26.571652);}if(value1 == "遵义会议会址" && value2 == "河滨公园"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.712242,26.574096);}if(value1 == "遵义会议会址" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.748007,27.046644);}if(value1 == "遵义会议会址" && value2 == "观山湖公园"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.641329,26.64611);}if(value1 == "遵义会议会址" && value2 == "遵义会议会址"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.927169,27.694728);}if(value1 == "遵义会议会址" && value2 == "娄山关"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.86388,28.027502);}if(value1 == "遵义会议会址" && value2 == "佛光岩景区"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(105.975946,28.395717);}if(value1 == "遵义会议会址" && value2 == "金鼎山"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.807694,27.741795);}if(value1 == "遵义会议会址" && value2 == "赤水瀑布"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(105.752489,28.380818);}if(value1 == "遵义会议会址" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(105.679142,25.985778);}if(value1 == "遵义会议会址" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(105.895188,26.098335);}if(value1 == "遵义会议会址" && value2 == "格凸河风景区"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(106.270015,25.682332);}if(value1 == "遵义会议会址" && value2 == "夜郎洞景区"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(105.638087,26.093807);}if(value1 == "遵义会议会址" && value2 == "西江千户苗寨"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(108.18029,26.500009);}if(value1 == "遵义会议会址" && value2 == "杉木河"){start = new BMap.Point(106.927169,27.694728);end = new BMap.Point(108.07022,27.117814);}//以娄山关为起点if(value1 == "娄山关" && value2 == "青岩古镇"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.694797,26.336564);}    if(value1 == "娄山关" && value2 == "黔灵山公园"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.699875,26.607748);}if(value1 == "娄山关" && value2 == "南江大峡谷"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.977224,26.946632);}if(value1 == "娄山关" && value2 == "花溪公园"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.678623,26.439248);}  if(value1 == "娄山关" && value2 == "森林公园"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.766015,26.558275);}if(value1 == "娄山关" && value2 == "花果园湿地公园"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.693124,26.571652);}if(value1 == "娄山关" && value2 == "河滨公园"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.712242,26.574096);}if(value1 == "娄山关" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.748007,27.046644);}if(value1 == "娄山关" && value2 == "观山湖公园"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.641329,26.64611);}if(value1 == "娄山关" && value2 == "遵义会议会址"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.927169,27.694728);}if(value1 == "娄山关" && value2 == "娄山关"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.86388,28.027502);}if(value1 == "娄山关" && value2 == "佛光岩景区"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(105.975946,28.395717);}if(value1 == "娄山关" && value2 == "金鼎山"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.807694,27.741795);}if(value1 == "娄山关" && value2 == "赤水瀑布"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(105.752489,28.380818);}if(value1 == "娄山关" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(105.679142,25.985778);}if(value1 == "娄山关" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(105.895188,26.098335);}if(value1 == "娄山关" && value2 == "格凸河风景区"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(106.270015,25.682332);}if(value1 == "娄山关" && value2 == "夜郎洞景区"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(105.638087,26.093807);}if(value1 == "娄山关" && value2 == "西江千户苗寨"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(108.18029,26.500009);}if(value1 == "娄山关" && value2 == "杉木河"){start = new BMap.Point(106.86388,28.027502);end = new BMap.Point(108.07022,27.117814);}//以佛光岩景区为起点if(value1 == "佛光岩景区" && value2 == "青岩古镇"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.694797,26.336564);} if(value1 == "佛光岩景区" && value2 == "黔灵山公园"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.699875,26.607748);}if(value1 == "佛光岩景区" && value2 == "南江大峡谷"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.977224,26.946632);}if(value1 == "佛光岩景区" && value2 == "花溪公园"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.678623,26.439248);} if(value1 == "佛光岩景区" && value2 == "森林公园"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.766015,26.558275);}if(value1 == "佛光岩景区" && value2 == "花果园湿地公园"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.693124,26.571652);}if(value1 == "佛光岩景区" && value2 == "河滨公园"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.712242,26.574096);}if(value1 == "佛光岩景区" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.748007,27.046644);}if(value1 == "佛光岩景区" && value2 == "观山湖公园"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.641329,26.64611);}if(value1 == "佛光岩景区" && value2 == "遵义会议会址"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.927169,27.694728);}if(value1 == "佛光岩景区" && value2 == "娄山关"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.86388,28.027502);}if(value1 == "佛光岩景区" && value2 == "佛光岩景区"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(105.975946,28.395717);}if(value1 == "佛光岩景区" && value2 == "金鼎山"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.807694,27.741795);}if(value1 == "佛光岩景区" && value2 == "赤水瀑布"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(105.752489,28.380818);}if(value1 == "佛光岩景区" && value2 == "黄果树瀑布景区"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(105.679142,25.985778);}if(value1 == "佛光岩景区" && value2 == "龙宫风景名胜区"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(105.895188,26.098335);}if(value1 == "佛光岩景区" && value2 == "格凸河风景区"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(106.270015,25.682332);}if(value1 == "佛光岩景区" && value2 == "夜郎洞景区"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(105.638087,26.093807);}if(value1 == "佛光岩景区" && value2 == "西江千户苗寨"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(108.18029,26.500009);}if(value1 == "佛光岩景区" && value2 == "杉木河"){start = new BMap.Point(105.975946,28.395717);end = new BMap.Point(108.07022,27.117814);}//以金鼎山为起点if(value1 == "金鼎山" && value2 == "青岩古镇"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.694797,26.336564);}   if(value1 == "金鼎山" && value2 == "黔灵山公园"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.699875,26.607748);}if(value1 == "金鼎山" && value2 == "南江大峡谷"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.977224,26.946632);}if(value1 == "金鼎山" && value2 == "花溪公园"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.678623,26.439248);}   if(value1 == "金鼎山" && value2 == "森林公园"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.766015,26.558275);}if(value1 == "金鼎山" && value2 == "花果园湿地公园"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.693124,26.571652);}if(value1 == "金鼎山" && value2 == "河滨公园"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.712242,26.574096);}if(value1 == "金鼎山" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.748007,27.046644);}if(value1 == "金鼎山" && value2 == "观山湖公园"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.641329,26.64611);}if(value1 == "金鼎山" && value2 == "遵义会议会址"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.927169,27.694728);}if(value1 == "金鼎山" && value2 == "娄山关"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.86388,28.027502);}if(value1 == "金鼎山" && value2 == "佛光岩景区"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(105.975946,28.395717);}if(value1 == "金鼎山" && value2 == "金鼎山"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.807694,27.741795);}if(value1 == "金鼎山" && value2 == "赤水瀑布"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(105.752489,28.380818);}if(value1 == "金鼎山" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(105.679142,25.985778);}if(value1 == "金鼎山" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(105.895188,26.098335);}if(value1 == "金鼎山" && value2 == "格凸河风景区"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(106.270015,25.682332);}if(value1 == "金鼎山" && value2 == "夜郎洞景区"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(105.638087,26.093807);}if(value1 == "金鼎山" && value2 == "西江千户苗寨"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(108.18029,26.500009);}if(value1 == "金鼎山" && value2 == "杉木河"){start = new BMap.Point(106.807694,27.741795);end = new BMap.Point(108.07022,27.117814);}//以赤水瀑布为起点if(value1 == "赤水瀑布" && value2 == "青岩古镇"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.694797,26.336564);}  if(value1 == "赤水瀑布" && value2 == "黔灵山公园"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.699875,26.607748);}if(value1 == "赤水瀑布" && value2 == "南江大峡谷"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.977224,26.946632);}if(value1 == "赤水瀑布" && value2 == "花溪公园"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.678623,26.439248);}    if(value1 == "赤水瀑布" && value2 == "森林公园"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.766015,26.558275);}if(value1 == "赤水瀑布" && value2 == "花果园湿地公园"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.693124,26.571652);}if(value1 == "赤水瀑布" && value2 == "河滨公园"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.712242,26.574096);}if(value1 == "赤水瀑布" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.748007,27.046644);}if(value1 == "赤水瀑布" && value2 == "观山湖公园"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.641329,26.64611);}if(value1 == "赤水瀑布" && value2 == "遵义会议会址"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.927169,27.694728);}if(value1 == "赤水瀑布" && value2 == "娄山关"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.86388,28.027502);}if(value1 == "赤水瀑布" && value2 == "佛光岩景区"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(105.975946,28.395717);}if(value1 == "赤水瀑布" && value2 == "金鼎山"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.807694,27.741795);}if(value1 == "赤水瀑布" && value2 == "赤水瀑布"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(105.752489,28.380818);}if(value1 == "赤水瀑布" && value2 == "黄果树瀑布景区"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(105.679142,25.985778);}if(value1 == "赤水瀑布" && value2 == "龙宫风景名胜区"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(105.895188,26.098335);}if(value1 == "赤水瀑布" && value2 == "格凸河风景区"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(106.270015,25.682332);}if(value1 == "赤水瀑布" && value2 == "夜郎洞景区"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(105.638087,26.093807);}if(value1 == "赤水瀑布" && value2 == "西江千户苗寨"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(108.18029,26.500009);}if(value1 == "赤水瀑布" && value2 == "杉木河"){start = new BMap.Point(105.752489,28.380818);end = new BMap.Point(108.07022,27.117814);}//以黄果树瀑布景区为起点if(value1 == "黄果树瀑布景区" && value2 == "青岩古镇"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.694797,26.336564);}   if(value1 == "黄果树瀑布景区" && value2 == "黔灵山公园"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.699875,26.607748);}if(value1 == "黄果树瀑布景区" && value2 == "南江大峡谷"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.977224,26.946632);}if(value1 == "黄果树瀑布景区" && value2 == "花溪公园"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.678623,26.439248);}   if(value1 == "黄果树瀑布景区" && value2 == "森林公园"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.766015,26.558275);}if(value1 == "黄果树瀑布景区" && value2 == "花果园湿地公园"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.693124,26.571652);}if(value1 == "黄果树瀑布景区" && value2 == "河滨公园"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.712242,26.574096);}if(value1 == "黄果树瀑布景区" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.748007,27.046644);}if(value1 == "黄果树瀑布景区" && value2 == "观山湖公园"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.641329,26.64611);}if(value1 == "黄果树瀑布景区" && value2 == "遵义会议会址"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.927169,27.694728);}if(value1 == "黄果树瀑布景区" && value2 == "娄山关"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.86388,28.027502);}if(value1 == "黄果树瀑布景区" && value2 == "佛光岩景区"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(105.975946,28.395717);}if(value1 == "黄果树瀑布景区" && value2 == "金鼎山"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.807694,27.741795);}if(value1 == "黄果树瀑布景区" && value2 == "赤水瀑布"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(105.752489,28.380818);}if(value1 == "黄果树瀑布景区" && value2 == "黄果树瀑布景区"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(105.679142,25.985778);}if(value1 == "黄果树瀑布景区" && value2 == "龙宫风景名胜区"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(105.895188,26.098335);}if(value1 == "黄果树瀑布景区" && value2 == "格凸河风景区"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(106.270015,25.682332);}if(value1 == "黄果树瀑布景区" && value2 == "夜郎洞景区"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(105.638087,26.093807);}if(value1 == "黄果树瀑布景区" && value2 == "西江千户苗寨"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(108.18029,26.500009);}if(value1 == "黄果树瀑布景区" && value2 == "杉木河"){start = new BMap.Point(105.679142,25.985778);end = new BMap.Point(108.07022,27.117814);}//以龙宫风景名胜区为起点if(value1 == "龙宫风景名胜区" && value2 == "青岩古镇"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.694797,26.336564);}   if(value1 == "龙宫风景名胜区" && value2 == "黔灵山公园"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.699875,26.607748);}if(value1 == "龙宫风景名胜区" && value2 == "南江大峡谷"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.977224,26.946632);}if(value1 == "龙宫风景名胜区" && value2 == "花溪公园"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.678623,26.439248);}   if(value1 == "龙宫风景名胜区" && value2 == "森林公园"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.766015,26.558275);}if(value1 == "龙宫风景名胜区" && value2 == "花果园湿地公园"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.693124,26.571652);}if(value1 == "龙宫风景名胜区" && value2 == "河滨公园"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.712242,26.574096);}if(value1 == "龙宫风景名胜区" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.748007,27.046644);}if(value1 == "龙宫风景名胜区" && value2 == "观山湖公园"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.641329,26.64611);}if(value1 == "龙宫风景名胜区" && value2 == "遵义会议会址"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.927169,27.694728);}if(value1 == "龙宫风景名胜区" && value2 == "娄山关"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.86388,28.027502);}if(value1 == "龙宫风景名胜区" && value2 == "佛光岩景区"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(105.975946,28.395717);}if(value1 == "龙宫风景名胜区" && value2 == "金鼎山"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.807694,27.741795);}if(value1 == "龙宫风景名胜区" && value2 == "赤水瀑布"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(105.752489,28.380818);}if(value1 == "龙宫风景名胜区" && value2 == "黄果树瀑布景区"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(105.679142,25.985778);}if(value1 == "龙宫风景名胜区" && value2 == "龙宫风景名胜区"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(105.895188,26.098335);}if(value1 == "龙宫风景名胜区" && value2 == "格凸河风景区"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(106.270015,25.682332);}if(value1 == "龙宫风景名胜区" && value2 == "夜郎洞景区"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(105.638087,26.093807);}if(value1 == "龙宫风景名胜区" && value2 == "西江千户苗寨"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(108.18029,26.500009);}if(value1 == "龙宫风景名胜区" && value2 == "杉木河"){start = new BMap.Point(105.895188,26.098335);end = new BMap.Point(108.07022,27.117814);}//以格凸河风景区为起点if(value1 == "格凸河风景区" && value2 == "青岩古镇"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.694797,26.336564);}    if(value1 == "格凸河风景区" && value2 == "黔灵山公园"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.699875,26.607748);}if(value1 == "格凸河风景区" && value2 == "南江大峡谷"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.977224,26.946632);}if(value1 == "格凸河风景区" && value2 == "花溪公园"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.678623,26.439248);}  if(value1 == "格凸河风景区" && value2 == "森林公园"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.766015,26.558275);}if(value1 == "格凸河风景区" && value2 == "花果园湿地公园"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.693124,26.571652);}if(value1 == "格凸河风景区" && value2 == "河滨公园"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.712242,26.574096);}if(value1 == "格凸河风景区" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.748007,27.046644);}if(value1 == "格凸河风景区" && value2 == "观山湖公园"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.641329,26.64611);}if(value1 == "格凸河风景区" && value2 == "遵义会议会址"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.927169,27.694728);}if(value1 == "格凸河风景区" && value2 == "娄山关"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.86388,28.027502);}if(value1 == "格凸河风景区" && value2 == "佛光岩景区"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(105.975946,28.395717);}if(value1 == "格凸河风景区" && value2 == "金鼎山"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.807694,27.741795);}if(value1 == "格凸河风景区" && value2 == "赤水瀑布"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(105.752489,28.380818);}if(value1 == "格凸河风景区" && value2 == "黄果树瀑布景区"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(105.679142,25.985778);}if(value1 == "格凸河风景区" && value2 == "龙宫风景名胜区"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(105.895188,26.098335);}if(value1 == "格凸河风景区" && value2 == "格凸河风景区"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(106.270015,25.682332);}if(value1 == "格凸河风景区" && value2 == "夜郎洞景区"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(105.638087,26.093807);}if(value1 == "格凸河风景区" && value2 == "西江千户苗寨"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(108.18029,26.500009);}if(value1 == "格凸河风景区" && value2 == "杉木河"){start = new BMap.Point(106.270015,25.682332);end = new BMap.Point(108.07022,27.117814);}//以夜郎洞景区为起点if(value1 == "夜郎洞景区" && value2 == "青岩古镇"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.694797,26.336564);} if(value1 == "夜郎洞景区" && value2 == "黔灵山公园"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.699875,26.607748);}if(value1 == "夜郎洞景区" && value2 == "南江大峡谷"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.977224,26.946632);}if(value1 == "夜郎洞景区" && value2 == "花溪公园"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.678623,26.439248);} if(value1 == "夜郎洞景区" && value2 == "森林公园"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.766015,26.558275);}if(value1 == "夜郎洞景区" && value2 == "花果园湿地公园"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.693124,26.571652);}if(value1 == "夜郎洞景区" && value2 == "河滨公园"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.712242,26.574096);}if(value1 == "夜郎洞景区" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.748007,27.046644);}if(value1 == "夜郎洞景区" && value2 == "观山湖公园"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.641329,26.64611);}if(value1 == "夜郎洞景区" && value2 == "遵义会议会址"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.927169,27.694728);}if(value1 == "夜郎洞景区" && value2 == "娄山关"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.86388,28.027502);}if(value1 == "夜郎洞景区" && value2 == "佛光岩景区"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(105.975946,28.395717);}if(value1 == "夜郎洞景区" && value2 == "金鼎山"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.807694,27.741795);}if(value1 == "夜郎洞景区" && value2 == "赤水瀑布"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(105.752489,28.380818);}if(value1 == "夜郎洞景区" && value2 == "黄果树瀑布景区"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(105.679142,25.985778);}if(value1 == "夜郎洞景区" && value2 == "龙宫风景名胜区"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(105.895188,26.098335);}if(value1 == "夜郎洞景区" && value2 == "格凸河风景区"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(106.270015,25.682332);}if(value1 == "夜郎洞景区" && value2 == "夜郎洞景区"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(105.638087,26.093807);}if(value1 == "夜郎洞景区" && value2 == "西江千户苗寨"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(108.18029,26.500009);}if(value1 == "夜郎洞景区" && value2 == "杉木河"){start = new BMap.Point(105.638087,26.093807);end = new BMap.Point(108.07022,27.117814);}//以西江千户苗寨为起点if(value1 == "西江千户苗寨" && value2 == "青岩古镇"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.694797,26.336564);} if(value1 == "西江千户苗寨" && value2 == "黔灵山公园"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.699875,26.607748);}if(value1 == "西江千户苗寨" && value2 == "南江大峡谷"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.977224,26.946632);}if(value1 == "西江千户苗寨" && value2 == "花溪公园"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.678623,26.439248);} if(value1 == "西江千户苗寨" && value2 == "森林公园"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.766015,26.558275);}if(value1 == "西江千户苗寨" && value2 == "花果园湿地公园"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.693124,26.571652);}if(value1 == "西江千户苗寨" && value2 == "河滨公园"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.712242,26.574096);}if(value1 == "西江千户苗寨" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.748007,27.046644);}if(value1 == "西江千户苗寨" && value2 == "观山湖公园"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.641329,26.64611);}if(value1 == "西江千户苗寨" && value2 == "遵义会议会址"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.927169,27.694728);}if(value1 == "西江千户苗寨" && value2 == "娄山关"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.86388,28.027502);}if(value1 == "西江千户苗寨" && value2 == "佛光岩景区"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(105.975946,28.395717);}if(value1 == "西江千户苗寨" && value2 == "金鼎山"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.807694,27.741795);}if(value1 == "西江千户苗寨" && value2 == "赤水瀑布"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(105.752489,28.380818);}if(value1 == "西江千户苗寨" && value2 == "黄果树瀑布景区"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(105.679142,25.985778);}if(value1 == "西江千户苗寨" && value2 == "龙宫风景名胜区"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(105.895188,26.098335);}if(value1 == "西江千户苗寨" && value2 == "格凸河风景区"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(106.270015,25.682332);}if(value1 == "西江千户苗寨" && value2 == "夜郎洞景区"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(105.638087,26.093807);}if(value1 == "西江千户苗寨" && value2 == "西江千户苗寨"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(108.18029,26.500009);}if(value1 == "西江千户苗寨" && value2 == "杉木河"){start = new BMap.Point(108.18029,26.500009);end = new BMap.Point(108.07022,27.117814);}//以杉木河为起点if(value1 == "杉木河" && value2 == "青岩古镇"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.694797,26.336564);}    if(value1 == "杉木河" && value2 == "黔灵山公园"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.699875,26.607748);}if(value1 == "杉木河" && value2 == "南江大峡谷"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.977224,26.946632);}if(value1 == "杉木河" && value2 == "花溪公园"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.678623,26.439248);}  if(value1 == "杉木河" && value2 == "森林公园"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.766015,26.558275);}if(value1 == "杉木河" && value2 == "花果园湿地公园"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.693124,26.571652);}if(value1 == "杉木河" && value2 == "河滨公园"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.712242,26.574096);}if(value1 == "杉木河" && value2 == "息烽集中营革命历史纪念馆"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.748007,27.046644);}if(value1 == "杉木河" && value2 == "观山湖公园"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.641329,26.64611);}if(value1 == "杉木河" && value2 == "遵义会议会址"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.927169,27.694728);}if(value1 == "杉木河" && value2 == "娄山关"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.86388,28.027502);}if(value1 == "杉木河" && value2 == "佛光岩景区"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(105.975946,28.395717);}if(value1 == "杉木河" && value2 == "金鼎山"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.807694,27.741795);}if(value1 == "杉木河" && value2 == "赤水瀑布"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(105.752489,28.380818);}if(value1 == "杉木河" && value2 == "黄果树瀑布景区"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(105.679142,25.985778);}if(value1 == "杉木河" && value2 == "龙宫风景名胜区"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(105.895188,26.098335);}if(value1 == "杉木河" && value2 == "格凸河风景区"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(106.270015,25.682332);}if(value1 == "杉木河" && value2 == "夜郎洞景区"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(105.638087,26.093807);}if(value1 == "杉木河" && value2 == "西江千户苗寨"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(108.18029,26.500009);}if(value1 == "杉木河" && value2 == "杉木河"){start = new BMap.Point(108.07022,27.117814);end = new BMap.Point(108.07022,27.117814);}/*  var map = new BMap.Map("allmap");map.centerAndZoom(new BMap.Point(106.63 , 26.65), 11);map.enableScrollWheelZoom(true);*/map.setMinZoom(8);//设置地图允许的最小级别map.clearOverlays();                        //清除地图上所有的覆盖物var driving = new BMap.DrivingRoute(map);    //创建驾车实例driving.search(start, end);                 //第一个驾车搜索driving.setSearchCompleteCallback(function(){var pts = driving.getResults().getPlan(0).getRoute(0).getPath();    //通过驾车实例,获得一系列点的数组var polyline = new BMap.Polyline(pts);     map.addOverlay(polyline);var m1 = new BMap.Marker(start);         //创建2个markervar m3 = new BMap.Marker(end);map.addOverlay(m1);map.addOverlay(m3);var lab1 = new BMap.Label("起点",{position:start});        //创建2个labelvar lab3 = new BMap.Label("终点",{position:end});   map.addOverlay(lab1);map.addOverlay(lab3);setTimeout(function(){map.setViewport([start,end]);          //调整到最佳视野},1000);});//计算驾车时间与距离var output = "从"+ value1 +"到"+ value2 +"驾车需要";var searchComplete = function (results){if (transit.getStatus() != BMAP_STATUS_SUCCESS){return ;}var plan = results.getPlan(0);output += plan.getDuration(true) + "\n";                //获取时间output += "总路程为:" ;output += plan.getDistance(true) + "\n";             //获取距离}var transit = new BMap.DrivingRoute(map, {renderOptions: {map: map},onSearchComplete: searchComplete,onPolylinesSet: function(){        setTimeout(function(){alert(output)},"1000");}});transit.search(value1, value2);}}//实现行政规划
window.plan = function (){  map.setMinZoom(8);//设置地图允许的最小级别function getBoundary(){       var bdary = new BMap.Boundary();bdary.get("贵阳市", function(rs){       //获取行政区域map.clearOverlays();        //清除地图覆盖物       var count = rs.boundaries.length; //行政区域的点有多少个if (count === 0) {alert('未能获取当前输入行政区域');return ;}var pointArray = [];for (var i = 0; i < count; i++) {var ply = new BMap.Polygon(rs.boundaries[i], {strokeWeight: 2, strokeColor: "#ff0000"}); //建立多边形覆盖物map.addOverlay(ply);  //添加覆盖物pointArray = pointArray.concat(ply.getPath());}    map.setViewport(pointArray);    //调整视野               });   }setTimeout(function(){getBoundary();}, 50);
}//实现定位功能
window.myfun = function (){ function myFun(result){var cityName = result.name;map.setCenter(cityName);alert("当前定位城市:"+cityName);}var myCity = new BMap.LocalCity();myCity.get(myFun);
}</script>

效果图:
这里写图片描述
这里写图片描述
这里写图片描述

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://808629.com/244.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 86后生记录生活 Inc. 保留所有权利。

底部版权信息