1

Wialon JS API - get unit group

Topic: Wialon JS API - get unit group

Dears,

How to know the unit group.

I am using this code to get the unit data:
https://sdk.wialon.com/playground/demo/get_units

please advise,

Regards,
Mina

2

Wialon JS API - get unit group

(edited by kaippally 01/08/2018 15:05:23)

Re: Wialon JS API - get unit group

Try this:

var unitGroup = sess.getItems("avl_unit_group");
Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."
3

Wialon JS API - get unit group

(edited by thiriaungmay10 02/08/2018 11:29:20)

Re: Wialon JS API - get unit group

Hello everyone,
I want to generate custom report between start geofence and end geofence like trip report.
Is there way for it.
Please,help me.

4

Wialon JS API - get unit group

(edited by kaippally 05/08/2018 08:31:37)

Re: Wialon JS API - get unit group

thiriaungmay10
To generate a report for trips between your selected geofences use the Rides table.
https://docs.wialon.com/en/hosting/user … bles/rides

Remember to select the required geofences to be included for report generation.

Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."
5

Wialon JS API - get unit group

(edited by thiriaungmay10 05/08/2018 12:22:57)

Re: Wialon JS API - get unit group

Thanks for your answer.
Now,I can generate ride report.But I want to generate with custom report using JS API.
I do not know how to add geofences parameters in custom ride report.
Can you guide me?

There is my custom template code:

var template = {// fill template object
    "id": 0,
    "n": "unit_rides",
    "ct": "avl_unit",
    "p":"",
    "tbl": [
    {
       
        "n": "unit_rides",
        "l": "Rides",
        "c": "ride,ride_from_name,ride_to_name,
        "cl": "Ride,Ride From,Ride To",
        "s": "",
        "sl": "",
        "p":"",
        "gt":"{\"ride_from\":1,\"ride_to\":17,\"ride\":\"*\"}",
        "sch": {
   
          "f1": 0,
          "f2": 0,
          "t1": 0,
          "t2": 0,
          "m": 0,
          "y": 0,
          "w": 0
        },
        "f": 128
      }]};

But I don't get any data.