1

Locator creation in Wialon SDK?

Тема: Locator creation in Wialon SDK?

hi guys,

seems that i am stupied: i dont find any way to create / edit / delete locator links via Wialon SDK?

Thanks a lot

Wolf

Politeness dictates it to write his name on a post
2

Locator creation in Wialon SDK?

Re: Locator creation in Wialon SDK?

generate locator link is same to generate token with sdk wialon. You must change the wialon hosting app to locator. check this link for more information about.

remote api https://sdk.wialon.com/wiki/en/sidebar/ … ken/update

to create, edit or delete chnage the callmode in the request.

sample code (PHP  remote API):
----------params request----------------------------
$parametrosLocator = array(
        "callMode" => "create", "app" => "locator", "at" => 0, "dur" => 86400, "fl" => 256,
        "p" => json_encode(array("note" => "", "pois" => 0, "zones" => 0, "tracks" => 0)), "items" => array(13809560)
    );
-------------------------------------------------------------
----------execute request----------------------------
$locator = json_decode($wialon_api->token_update(json_encode($paramsLocator)),true);
--------------------------------------------------------------
sample request and response

request
      params:{"callMode":"create","app":"locator","at":0,"dur":86400,"fl":256,"p":"{\"note\":\"\",\"zones\":0,\"tracks\":0}","items":[13809560]}

Response
       {"h":"d9e673294c64a16afc0cd581fd71596c3EA8019052D397E2371F3F110A80B91306D8D82B","app":"locator","at":1492525493,"ct":1492525493,"dur":86400,"fl":256,"items":[13809560],"p":"{\"note\":\"\",\"zones\":0,\"tracks\":0}"}

you need take the property h of this respense because that is you locator link

On my case concat that property with 

http://service.enterares.com/locator/in … 1306D8D82B