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