Want to use gold maps API to develop a small program, with the help of path planning part of the map of Scott JS API API,
Var realtime=0;//the problem from here and here to set the first 0,
Walking. Search (new AMap. LngLat (lonlatt. Lon, lonlatt. Lat),
New AMap. LngLat (enclosing lonlat. Lon, enclosing lonlat. Lat), function (the status, the result) {
Var nowtime=0;
{if (status=="complete")
Flag=1;
for(var i=0; I & lt; Result. The routes. Length; I + +) {//realtime=) (status, the result)
Nowtime +=result. Routes [I] time;
}
Realtime=nowtime;//this assignment the realtime
}
The else {
Document. The getElementById (" test "). The innerHTML=result. The info;
}
});
Document. The getElementById (" test "). InnerHTML=realtime;//here shows 0, realtime has not been changed,
Want to ask how to change, the ball ball, orz