现在向大家介绍一下我们的脚本来如何模拟那些用户的漫游和发送位置更新信息: function userInit() {
loadMap("streets.csv");
}
function VUSER() {
position = randPosition();
//some steps to sign in, omitted here
while (1) {
move(position, 30); //move 30 feet
p = getLoc(position);
http.POSTData = q|{"latitude": ${p[0]}, "longtitude": ${p[1]} }|;
action(http, "http://www.example.com/uploadLocation");
sleep(10000); //waiting 10 second
}
}