修改代码:
给前台的json数据:
{
hostId: 2616,
hostNo: 闽C0C133,
list: [{
pathDate: 2017-02-22,
startTime: 2017-02-2209: 21: 19,
endTime: 2017-02-2217: 56: 21,
startAddress: 泉州市惠安县西苑路85号,
startLon: 118.791344,
startLat: 25.034976,
endAddress: 泉州市晋江市德泰路4-2号,
endLon: 118.556072,
endLat: 24.877144,
trackKm: 47.573,
stopTimeLen: null,
runTimeLen: 1小时18分2秒,
partList: [{
pathDate: null,
startTime: 2017-02-2209: 21: 19,
endTime: 2017-02-2209: 22: 43,
startAddress: 泉州市惠安县西苑路85号,
startLon: 118.791344,
startLat: 25.034976,
endAddress: 泉州市惠安县西苑路75号,
endLon: 118.7924,
endLat: 25.033736,
trackKm: 0.184,
stopTimeLen: 2小时59分27秒,
runTimeLen: 1分24秒,
partList: null,
startTrackKm: null,
endTrackKm: null,
extraMap: null
},
{
pathDate: null,
startTime: 2017-02-2212: 22: 10,
endTime: 2017-02-2212: 23: 17,
startAddress: 泉州市惠安县科山路22号,
startLon: 118.792088,
startLat: 25.034026,
endAddress: 泉州市惠安县西苑路85号,
endLon: 118.791304,
endLat: 25.035106,
trackKm: 0.221,
stopTimeLen: 2小时26分28秒,
runTimeLen: 1分7秒,
partList: null,
startTrackKm: null,
endTrackKm: null,
extraMap: null
},
{
pathDate: null,
startTime: 2017-02-2214: 49: 45,
endTime: 2017-02-2214: 51: 10,
startAddress: 泉州市惠安县西苑路85号,
startLon: 118.791256,
startLat: 25.035078,
endAddress: 泉州市惠安县西苑路75号,
endLon: 118.792408,
endLat: 25.033748,
trackKm: 0.205,
stopTimeLen: 33分17秒,
runTimeLen: 1分25秒,
partList: null,
startTrackKm: null,
endTrackKm: null,
extraMap: null
},
{
pathDate: null,
startTime: 2017-02-2215: 24: 27,
endTime: 2017-02-2215: 29: 15,
startAddress: 泉州市惠安县科山路20号,
startLon: 118.79168,
startLat: 25.033708,
endAddress: 泉州市惠安县科山路18号,
endLon: 118.79208,
endLat: 25.033472,
trackKm: 0.326,
stopTimeLen: 22分2秒,
runTimeLen: 4分48秒,
partList: null,
startTrackKm: null,
endTrackKm: null,
extraMap: null
},
{
pathDate: null,
startTime: 2017-02-2215: 51: 17,
endTime: 2017-02-2215: 54: 43,
startAddress: 泉州市惠安县科山路20号,
startLon: 118.792192,
startLat: 25.033548,
endAddress: 泉州市惠安县科山路36号,
endLon: 118.793112,
endLat: 25.036988,
trackKm: 0.59,
stopTimeLen: 48分41秒,
runTimeLen: 3分26秒,
partList: null,
startTrackKm: null,
endTrackKm: null,
extraMap: null
},
{
pathDate: null,
startTime: 2017-02-2216: 43: 24,
endTime: 2017-02-2217: 22: 51,
startAddress: 泉州市惠安县科山路36号,
startLon: 118.793184,
startLat: 25.036998,
endAddress: 泉州市丰泽区段湖路134号,
endLon: 118.58272,
endLat: 24.926766,
trackKm: 37.128,
stopTimeLen: 7分5秒,
runTimeLen: 39分27秒,
partList: null,
startTrackKm: null,
endTrackKm: null,
extraMap: null
},
{
pathDate: null,
startTime: 2017-02-2217: 29: 56,
endTime: 2017-02-2217: 56: 21,
startAddress: 泉州市丰泽区段湖路134号,
startLon: 118.582736,
startLat: 24.926868,
endAddress: 泉州市晋江市德泰路4-2号,
endLon: 118.556072,
endLat: 24.877144,
trackKm: 8.919,
stopTimeLen: ,
runTimeLen: 26分25秒,
partList: null,
startTrackKm: null,
endTrackKm: null,
extraMap: null
}],
startTrackKm: 1728.565,
endTrackKm: 1776.138,
extraMap: null
}],
retCode: 0,
retMsg: ,
pkId: null,
extraMap: null
}
可以看出有startTrackKm: 1728.565,endTrackKm: 1776.138都在list里面,OK