Commit cf82f26e0676fa01e48067e5171eef6f5816cf82
1 parent
d823ec73
1.非正常使用百度api问题
Showing
1 changed file
with
2 additions
and
1 deletions
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
| @@ -811,7 +811,8 @@ window.WorldsBMap = function () { | @@ -811,7 +811,8 @@ window.WorldsBMap = function () { | ||
| 811 | } | 811 | } |
| 812 | } | 812 | } |
| 813 | // 路段中间点为中心 | 813 | // 路段中间点为中心 |
| 814 | - var c = p.ia[Math.floor(p.ia.length/2)]; | 814 | + var path = p.getPath(); |
| 815 | + var c = path[Math.floor(path.length / 2)]; | ||
| 815 | mapBValue.centerAndZoom(new BMap.Point(c.lng, c.lat), 18); | 816 | mapBValue.centerAndZoom(new BMap.Point(c.lng, c.lat), 18); |
| 816 | p.addEventListener('dblclick', function () { | 817 | p.addEventListener('dblclick', function () { |
| 817 | /** 设置修改路段集合对象为空 */ | 818 | /** 设置修改路段集合对象为空 */ |