1

update geofence data

Тема: update geofence data

I trying to update the geofence data, i using php but i have a error 7.  i dont know if  need pass all parameters, i only want update the 'w' parameter.

I signed  with the resource owner of geofence.

The code that i using is this:

$params = array(
    'itemId' =>12123,
    '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' => 0,
        'max' => 18,
        'path' => '',
        'libId' => 0,
        );
       
    $data = $wialon_api->resource_update_zone(json_encode($params));

i follow the api documentation: http://sdk.wialon.com/wiki/en/kit/remot … pdate_zone

can someone help me?

Thanks

2

update geofence data

Re: update geofence data

Hi

i dont know if  need pass all parameters, i only want update the 'w' parameter.

Using Remote API you have to send all parameters

but i have a error 7.

Error 7 is about user access.
First of all check your token access type, for testing try to use token with access_type=-1

3

update geofence data

Re: update geofence data

Ok. i got the token using the url

http://hosting.wialon.com/login.htmlcli … p;css_url=


and i tried again update the data of geofence, now the response is error 4 (invalid input),  I have dude in the fields or parameters with data type are uint and doble and i dont know or i dont use the data of parameter. Example: the parameter oldItemId, what i should put in this parameter if i dont use this, the same way to oldPoiId, x , y, r.

here is the code i'm using to do this.

$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' => 0,
        'max' => 18,
        'path' => '',
        'libId' => 0,
        'oldItemId'=>'',
           'oldPoiId'=>'',
           'p'=> array (
                           'x'=>0,
                           'y'=>0,
                           'r'=>0
                    )
        );
       
     $data = $wialon_api->resource_update_zone(json_encode($params));
     $data = json_decode($data,true);

    echo "<pre>";
    print_r($data);
    echo "<pre>"

4

update geofence data

Re: update geofence data

wcauichr, oldItemId and oldPoiId parameters are only needed for copying geofences. Remove them.

Head of Wialon Local Department
Gurtam