Commit c4d24735fc8e88d2079145548c47864cf5d9d40d
1 parent
e03644e8
1.加入电子前置围栏能力(应对终点多次进入的情况)
Showing
1 changed file
with
11 additions
and
10 deletions
src/main/resources/static/pages/base/stationroute/js/routes-operation.js
| ... | ... | @@ -1984,16 +1984,17 @@ var RoutesOperation = (function () { |
| 1984 | 1984 | var harr = new Array, i = 0; |
| 1985 | 1985 | for (i = 0;i < points.length;i++) { |
| 1986 | 1986 | harr.push('<option value="', points[i].stationName, '_station">', points[i].stationName, '</option>'); |
| 1987 | - points[i].bdPoint = points[i].station.bJwpoints; | |
| 1988 | - points[i].bdPoints = points[i].station.bdPolygon; | |
| 1989 | - points[i].shapesType = points[i].station.shapesType; | |
| 1990 | - points[i].radius = points[i].station.radius; | |
| 1987 | + points[i].bdPoint = points[i].station.centerPointWkt; | |
| 1988 | + points[i].bdPoints = points[i].bufferPolygonWkt; | |
| 1989 | + points[i].shapedType = points[i].shapedType; | |
| 1990 | + points[i].radius = points[i].radius; | |
| 1991 | 1991 | name2Point[points[i].stationName + '_station'] = points[i]; |
| 1992 | 1992 | } |
| 1993 | 1993 | harr.push('<option value="', carpark.parkName, '_park">', carpark.parkName, '</option>'); |
| 1994 | 1994 | carpark.bdPoint = carpark.bCenterPoint; |
| 1995 | 1995 | carpark.bdPoints = carpark.bParkPoint; |
| 1996 | 1996 | carpark.stationName = carpark.parkName; |
| 1997 | + carpark.shapedType = carpark.shapesType; | |
| 1997 | 1998 | name2Point[carpark.parkName + '_park'] = carpark; |
| 1998 | 1999 | |
| 1999 | 2000 | return harr.join(''); |
| ... | ... | @@ -2045,20 +2046,20 @@ var RoutesOperation = (function () { |
| 2045 | 2046 | var routes = result1.data.routes, rootNode; |
| 2046 | 2047 | operation.clearMarkAndOverlays(); |
| 2047 | 2048 | var startPoint = name2Point[start.join('_')], endPoint = name2Point[end.join('_')], point, points; |
| 2048 | - if (startPoint.shapesType === 'r') { | |
| 2049 | - point = startPoint.bdPoint.split(' '); | |
| 2049 | + if (startPoint.shapedType === 'r') { | |
| 2050 | + point = startPoint.bdPoint.replace('POINT(', '').replace(')', '').split(' '); | |
| 2050 | 2051 | operation.drawCircle({lng : point[0], lat : point[1]}, startPoint.radius, startPoint.stationName, true); |
| 2051 | - } else if (startPoint.shapesType === 'd') { | |
| 2052 | + } else if (startPoint.shapedType === 'd') { | |
| 2052 | 2053 | points = startPoint.bdPoints; |
| 2053 | 2054 | points = points.replace('POLYGON ((', '').replace('POLYGON((', '').replaceAll(', ', ',').replace('))', ''); |
| 2054 | 2055 | points = points.split(',') |
| 2055 | 2056 | operation.drawPolygon(points, startPoint.stationName, true); |
| 2056 | 2057 | } |
| 2057 | 2058 | |
| 2058 | - if (endPoint.shapesType === 'r') { | |
| 2059 | - point = endPoint.bdPoint.split(' '); | |
| 2059 | + if (endPoint.shapedType === 'r') { | |
| 2060 | + point = endPoint.bdPoint.replace('POINT(', '').replace(')', '').split(' '); | |
| 2060 | 2061 | operation.drawCircle({lng : point[0], lat : point[1]}, endPoint.radius, endPoint.stationName, true); |
| 2061 | - } else if (endPoint.shapesType === 'd') { | |
| 2062 | + } else if (endPoint.shapedType === 'd') { | |
| 2062 | 2063 | points = endPoint.bdPoints; |
| 2063 | 2064 | points = points.replace('POLYGON ((', '').replace('POLYGON((', '').replaceAll(', ', ',').replace('))', ''); |
| 2064 | 2065 | points = points.split(',') | ... | ... |