Topic: Hi, could you tell me what exactly the avl_road will extract in the JS
Hi,
Would you tell me what exactly the avl_road extract and return as information in the JS ?
Thanks
NTS
Hi,
Would you tell me what exactly the avl_road extract and return as information in the JS ?
Thanks
NTS
Please ask you question again. Because we can't understand what means "avl_road", maybe you mean route?
I guess he means avl_route, yes.
wialon.core.Session.getInstance().loadLibrary("routeRounds");
wialon.core.Session.getInstance().loadLibrary("routeSchedules");
var spec = [{type: "type",
data: "avl_route",
flags: wialon.item.Item.dataFlag.base|wialon.item.Route.dataFlag.config|wialon.item.Route.dataFlag.rounds|wialon.item.Route.dataFlag.schedules|wialon.item.Route.dataFlag.checkPoints,
mode: 0}];
wialon.core.Session.getInstance().updateDataFlags(spec,function (code) {
if (code != 0) {
alert(wialon.core.Errors.getErrorText(code));
return;
}
var routes = wialon.core.Session.getInstance().getItems("avl_route");
for(var i=0; i<routes.length; i++)
console.log(routes[i]);
});
then if you look into console you will find all methods and properties of route
Could you help me get my routes pair please?
This is my code:
$url="https://hst-api.wialon.com/wialon/ajax.html?svc=core/search_items¶ms={'spec':{".
"'itemsType':'avl_route','propName':'route_schedules', 'propValueMask':'*','sortType':'route_schedules'},".
"'propType':'guid','force':1, 'flags':0x00000200, 'from':0, 'to':0}&sid=".$sidS;
$json = file_get_contents($url);
echo $json;