Тема: How to get the POIs using the Remote API?
Hello again,
I'm trying to get the list of POIs from my site via the Remote API, using my user/password.
Again, I have found no example in the API documentation, but after reading the code of the page of my site, I guessed the POIs are resources (or so I think), so started using the "avl_resource" type. The call I'm making looks like this (it's in C#):
private static string WialonGetPOIs(string sid)
{
string urlGetPOIs =
"http://hosting.wialon.com/wialon/ajax.html?svc=core/update_data_flags&sid=" + sid +
"¶ms={" +
"\"spec\":[" + /* array of requests to the server */
"{" +
"\"type\":\"type\"," + /* get objects by type */
"\"data\":\"avl_resource\"," + /* type is set to "avl_resource" (does that get the POIs?) */
"\"flags\":1," + /* get common information */
"\"mode\":0" + /* set flags */
"}" +
"]" +
"}";
return (new WebClient()).DownloadString(urlGetPOIs);
}
With that call I do get some results, but they seem weird. Firstly, there's only one element in the returned JSON string, while I have four POIs in my site. Also, the resource I'm getting is visibly none of the POIs registered in my site, as the returned name is totally different. I experimented with some flag values, quite blindly, but nothing helpful came out this far.
So, can you please help me to get the list of POIs and their positions using the Remote API?
Thanks in advance!