Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:pro:remoteapi:codesamples:reports [07/03/2013 12:05]
zuve
en:pro:remoteapi:codesamples:reports [17/04/2013 13:41]
zuve
Line 19: Line 19:
  "​flags":​0  "​flags":​0
  }  }
- }&sid=<​your_sid>​+ }&ssid=<​your_sid>​
 </​code>​ </​code>​
 Response: Response:
Line 27: Line 27:
         "​msgsRendered":​ 1,         "​msgsRendered":​ 1,
         "​stats":​ [         "​stats":​ [
-            ["Время в движении", "​7:​09:​23"​],​ +            ["Move time", "​7:​09:​23"​],​ 
-            ["Кол-во поездок", "​120"​],​ +            ["Trips count", "​120"​],​ 
-            ["Количество остановок", "​0"​],​ +            ["Stops count", "​0"​],​ 
-            ["Продолжительность стоянок", "​19 ​дней ​16:​34:​20"​],​ +            ["Parking time", "​19 ​days 16:​34:​20"​],​ 
-            ["Количество стоянок", "​121"​]+            ["Parkings count", "​121"​]
         ],         ],
         "​tables":​ [{         "​tables":​ [{
             "​nm":​ "​unit_trips",​             "​nm":​ "​unit_trips",​
-            "​text":​ "Поездки без остановок",+            "​text":​ "Trips without stops",
             "​f":​ 4497,             "​f":​ 4497,
             "​r":​ 16,             "​r":​ 16,
             "​c":​ 16,             "​c":​ 16,
-            "​h":​ ["​№",​ "Дата", "Начало", "Нач. положение", "Конец", "Конеч. положение", "Водитель", "Длительность", "Моточасы", "Пробег", "Пробег ​(скорректированный)", "Ср. скорость", "Макс. скорость", "Кол-во поездок", "Нач. уровень", "Конеч. уровень"], +            "​h":​ ["​№",​ "Date", "Beginning", "Initial location", "End", "Final location", "Driver", "Duration", "Engine hours", "Mileage", "Mileage ​(adjusted)", "Avg speed", "Max speed", "Trips count", "Initial fuel level", "Final fuel level"], 
-            "​t":​ ["",​ "",​ "​2013-01-01 17:​36:​58",​ "",​ "​2013-01-20 18:​26:​50",​ "",​ "",​ "​7:​09:​23",​ "​0:​00:​00",​ "​0.00 ​км", "​0.00 ​км", "​0 ​км\/ч", "​118 ​км\/ч", "​120",​ "​0 ​л", "​0 ​л"]+            "​t":​ ["",​ "",​ "​2013-01-01 17:​36:​58",​ "",​ "​2013-01-20 18:​26:​50",​ "",​ "",​ "​7:​09:​23",​ "​0:​00:​00",​ "​0.00 ​km", "​0.00 ​km", "​0 ​km\/h", "​118 ​km\/h", "​120",​ "​0 ​lt", "​0 ​lt"]
         }, {         }, {
             "​nm":​ "​unit_stays",​             "​nm":​ "​unit_stays",​
-            "​text":​ "Стоянки",+            "​text":​ "Parkings",
             "​f":​ 272,             "​f":​ 272,
             "​r":​ 74,             "​r":​ 74,
             "​c":​ 5,             "​c":​ 5,
-            "​h":​ ["Начало", "Конец", "Длительность", "Положение", "Кол-во"], +            "​h":​ ["Beginning", "End", "Duration", "Location", "Count"], 
-            "​t":​ ["​2013-01-01 00:​07:​56",​ "​2013-01-20 23:​51:​39",​ "​19 ​дней ​13:​50:​40",​ "",​ "​74"​]+            "​t":​ ["​2013-01-01 00:​07:​56",​ "​2013-01-20 23:​51:​39",​ "​19 ​days 13:​50:​40",​ "",​ "​74"​]
         }],         }],
         "​attachments":​ [{         "​attachments":​ [{
-            "​n":​ "График скорости и пробега",+            "​n":​ "Speed and mileage chart",
             "​t":​ "​chart"​             "​t":​ "​chart"​
         }]         }]
Line 99: Line 99:
  "​indexFrom":​0,​  "​indexFrom":​0,​
  "​indexTo":​0  "​indexTo":​0
- }&sid=<​your_sid>​+ }&ssid=<​your_sid>​
 </​code>​ </​code>​
 Response: Response:
Line 115: Line 115:
         "​x":​ 27.4998528         "​x":​ 27.4998528
     }, {     }, {
-        "​t":​ "Берута ул., Минск",+        "​t":​ "Beruta st., Minsk",
         "​y":​ 53.9097984,         "​y":​ 53.9097984,
         "​x":​ 27.4998528         "​x":​ 27.4998528
Line 123: Line 123:
         "​x":​ 27.5675072         "​x":​ 27.5675072
     }, {     }, {
-        "​t":​ "Маяковского ул., Минск",+        "​t":​ "Mayakovskogo st., Minsk",
         "​y":​ 53.8847872,         "​y":​ 53.8847872,
         "​x":​ 27.5675072         "​x":​ 27.5675072
-    }, "",​ "​0:​11:​15",​ "​0:​00:​00",​ "​0.00 ​км", "​0.00 ​км", "​0 ​км\/ч", { +    }, "",​ "​0:​11:​15",​ "​0:​00:​00",​ "​0.00 ​km", "​0.00 ​km", "​0 ​km\/h", { 
-        "​t":​ "​72 ​км\/ч",+        "​t":​ "​72 ​km\/h",
         "​y":​ 53.9070656,         "​y":​ 53.9070656,
         "​x":​ 27.5216608         "​x":​ 27.5216608
-    }, "​3",​ "​0 ​л", "​0 ​л"]+    }, "​3",​ "​0 ​lt", "​0 ​lt"]
 }] }]
 </​code>​ </​code>​
Line 140: Line 140:
  "​tableIndex":​0,​  "​tableIndex":​0,​
  "​rowIndex":​0  "​rowIndex":​0
- }&sid=<​your_sid>​+ }&ssid=<​your_sid>​
 </​code>​ </​code>​
 Response: Response:
Line 154: Line 154:
         "​x":​ 27.4998528         "​x":​ 27.4998528
     }, {     }, {
-        "​t":​ "Берута ул., Минск",+        "​t":​ "Beruta st., Minsk",
         "​y":​ 53.9097984,         "​y":​ 53.9097984,
         "​x":​ 27.4998528         "​x":​ 27.4998528
Line 162: Line 162:
         "​x":​ 27.4865568         "​x":​ 27.4865568
     }, {     }, {
-        "​t":​ "Матусевича ул., Минск",+        "​t":​ "Matusevicha st., Minsk",
         "​y":​ 53.9152448,         "​y":​ 53.9152448,
         "​x":​ 27.4865568         "​x":​ 27.4865568
-    }, "",​ "​0:​02:​43",​ "​0:​00:​00",​ "​0.00 ​км", "​0.00 ​км", "​0 ​км\/ч", { +    }, "",​ "​0:​02:​43",​ "​0:​00:​00",​ "​0.00 ​km", "​0.00 ​km", "​0 ​km\/h", { 
-        "​t":​ "​34 ​км\/ч",+        "​t":​ "​34 ​km\/h",
         "​y":​ 53.910112,         "​y":​ 53.910112,
         "​x":​ 27.495648         "​x":​ 27.495648
-    }, "​1",​ "​0 ​л", "​0 ​л"]+    }, "​1",​ "​0 ​lt", "​0 ​lt"]
 }, { }, {
     "​i1":​ 151,     "​i1":​ 151,
Line 180: Line 180:
         "​x":​ 27.492064         "​x":​ 27.492064
     }, {     }, {
-        "​t":​ "Данилы Сердича ул., 68, Минск",+        "​t":​ "Danily Serdicha st., 68, Minsk",
         "​y":​ 53.9205888,         "​y":​ 53.9205888,
         "​x":​ 27.492064         "​x":​ 27.492064
Line 188: Line 188:
         "​x":​ 27.4950912         "​x":​ 27.4950912
     }, {     }, {
-        "​t":​ "улПритыцкогоРатомка",+        "​t":​ "Pritytskogo st., Ratomka",
         "​y":​ 53.9094592,         "​y":​ 53.9094592,
         "​x":​ 27.4950912         "​x":​ 27.4950912
-    }, "",​ "​0:​03:​57",​ "​0:​00:​00",​ "​0.00 ​км", "​0.00 ​км", "​0 ​км\/ч", { +    }, "",​ "​0:​03:​57",​ "​0:​00:​00",​ "​0.00 ​km", "​0.00 ​km", "​0 ​km\/h", { 
-        "​t":​ "​41 ​км\/ч",+        "​t":​ "​41 ​km\/h",
         "​y":​ 53.9177472,         "​y":​ 53.9177472,
         "​x":​ 27.4873152         "​x":​ 27.4873152
-    }, "​1",​ "​0 ​л", "​0 ​л"]+    }, "​1",​ "​0 ​lt", "​0 ​lt"]
 }, { }, {
     "​i1":​ 200,     "​i1":​ 200,
Line 206: Line 206:
         "​x":​ 27.5369984         "​x":​ 27.5369984
     }, {     }, {
-        "​t":​ "Клары Цеткин ул., Минск",+        "​t":​ "Klary Tsetkin st., Minsk",
         "​y":​ 53.8974912,         "​y":​ 53.8974912,
         "​x":​ 27.5369984         "​x":​ 27.5369984
Line 214: Line 214:
         "​x":​ 27.5675072         "​x":​ 27.5675072
     }, {     }, {
-        "​t":​ "Маяковского ул., Минск",+        "​t":​ "Mayakovskogo st., Minsk",
         "​y":​ 53.8847872,         "​y":​ 53.8847872,
         "​x":​ 27.5675072         "​x":​ 27.5675072
-    }, "",​ "​0:​04:​35",​ "​0:​00:​00",​ "​0.00 ​км", "​0.00 ​км", "​0 ​км\/ч", { +    }, "",​ "​0:​04:​35",​ "​0:​00:​00",​ "​0.00 ​km", "​0.00 ​km", "​0 ​km\/h", { 
-        "​t":​ "​62 ​км\/ч",+        "​t":​ "​62 ​km\/h",
         "​y":​ 53.8868928,         "​y":​ 53.8868928,
         "​x":​ 27.5656         "​x":​ 27.5656
-    }, "​1",​ "​0 ​л", "​0 ​л"]+    }, "​1",​ "​0 ​lt", "​0 ​lt"]
 }] }]
 </​code>​ </​code>​
  
 ===== Getting graphic data ===== ===== Getting graphic data =====
-При выполнении отчета "​_Поездки,​топливо ​(1)" был сгенерирован слой, отражающий поездки и остановки объекта. Изображение в котором будет отображен данный слой наложенный на карту можно получить запросом ​[[../​apiref/​report/​get_result_map|get_result_map]]:​+ 
 +During execution of the report a layer with trips and parkings was generated for the report. We can get the image of this layer (combined with mapusing the request ​[[../​apiref/​report/​get_result_map|get_result_map]]:​ 
 <​code>​ <​code>​
 <​your_wialon_pro_address>/​ajax.html?​svc=report/​get_result_map&​ <​your_wialon_pro_address>/​ajax.html?​svc=report/​get_result_map&​
Line 232: Line 234:
  "​width":​600,​  "​width":​600,​
  "​height":​600  "​height":​600
- }&sid=<​your_sid>​+ }&ssid=<​your_sid>​
 </​code>​ </​code>​
  
-Результат выполнения:+Response:
 {{ /​remote_ex/​map.png?​nolink }} {{ /​remote_ex/​map.png?​nolink }}
  
-Также данный отчет содержит график скорости и пробегаЕго можно получить используя запрос ​[[../​apiref/​report/​get_result_chart|get_result_chart]]. ​Для тогочтобы заголовок был над графиком мы указываем флаг ​0×01, ​а легенда была под графиком - 0x200.+Also there is "Speed and mileage chart" in the reportYou can get its image using the request ​[[../​apiref/​report/​get_result_chart|get_result_chart]]. ​To place a chart name above the chartset the flag 0×01, ​and to place a legend under the chart, set the flag 0x200. 
 <​code>​ <​code>​
 <​your_wialon_pro_address>/​ajax.html?​svc=report/​get_result_chart&​ <​your_wialon_pro_address>/​ajax.html?​svc=report/​get_result_chart&​
Line 250: Line 253:
  "​pixelTo":​300,​  "​pixelTo":​300,​
  "​flags":​513  "​flags":​513
- }&sid=<​your_sid>​+ }&ssid=<​your_sid>​
 </​code>​ </​code>​
  
-Результат выполнения+Response
-{{ /remote_ex/chart_ru.png?nolink }}+{{ /remote_ex/chart_en.png?nolink }}
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam