1

Update geofence (Colors format)

Тема: Update geofence (Colors format)

I'm trying update the geofence data in specific the radius, but i have doubts about the parameters c (color argb )and tc (color rgb), i got the data of the geofence with get_zone_data function, this function show me the data of geofence. attach the response image. So to update the geofence i'm trying to copy the data of parameters c and tc like i got in the response of get_zone_data. But i had error 4. In the documentation of update_zone show the parameter c is int and tc is uint. My question is, what format must i put in these parameters ? Can someone put an example of the update_zone, ooh i forget tell, i'm using php. Here my code.



$params = array(
        'itemId' => 642602,// recurso sistemas
        'id'=> 11,
        'callMode'=>'update',
        'n' => 'GAS_Calle 27 De Febrero',
        'd' => 'Calle 27 De Febrero<br/>Balancán,Tabasco<br/>E03229',
        't' => 3,
        'w' => 30,
        'f' => 48,
        'c' => 2568583984,
        'tc' => 16733440,
        'ts' => 12,
        'min' => 1,
        'max' => 18,
        'path' => "",
        'libId' =>"",
        'oldItemId'=>642602,
           'oldZoneId'=>11,
           'p'=> array (
                           'x'=>-91.17545,
                           'y'=>17.91579,
                           'r'=>30
                    )
        );

2

Update geofence (Colors format)

Re: Update geofence (Colors format)

wcauichr, "c" and "tc" parameters are ok in your request.
The problem is with parameter "p". You should pass there array of objects. It should look like this:
[{x: 0.0, y:0.0, r:100}, {...}].
Try to change your "p" param to this:
          'p'=> array (array (
                           'x'=>-91.17545,
                           'y'=>17.91579,
                           'r'=>30
                    ))

Head of Wialon Local Department
Gurtam
3

Update geofence (Colors format)

Re: Update geofence (Colors format)

Thanks, now my code runs good smile

deal пишет:

wcauichr, "c" and "tc" parameters are ok in your request.
The problem is with parameter "p". You should pass there array of objects. It should look like this:
[{x: 0.0, y:0.0, r:100}, {...}].
Try to change your "p" param to this:
          'p'=> array (array (
                           'x'=>-91.17545,
                           'y'=>17.91579,
                           'r'=>30
                    ))