Locus Map - forum

Development => Developers => Topic started by: simperialwalker on July 23, 2021, 13:41:28

Title: Locus Live Tracking questions
Post by: simperialwalker on July 23, 2021, 13:41:28
Hi,
i am currently developing an open source web server for the Locus Custom Live Tracking service. I have managed to setup Locus Map to send every parameter (latitude, longitude, altitude, speed, accuracy, bearing, current time, battery level, gsm signal and a token used for authentication) and respond with custom markpoints, correctly displayed by the Locus Map App. But, in the course of development I have encountered 2 major problems:
Also, a feature that would be really good and could help to solve the second problem would be the ability to set custom markpoints' icons (from the Locus Map icon set).
Any help would be appreciated.

Thanks!
Title: Re: Locus Live Tracking questions
Post by: Menion on July 23, 2021, 15:13:55
Hello,

nice to see an active developer  :).

Problems
1. this is correct, the failed request is currently silently ignored and only the "fail" counter is increased.

I've updated the system a little bit and now the result of the last operation will be saved and available in the tracking item detail screen > top toolbar.

2. This is more interesting because it should work as expected. Received points should completely replace set of currently visible points. May you please double check it? Thanks.
Title: Re: Locus Live Tracking questions
Post by: simperialwalker on July 23, 2021, 16:55:18
First of all, thank you so much for the patch for the point 1! :D

Secondly, I've done a little more testing and, using Burp Suite, i can confirm you that once a point is given in the response (so set on the map) it won't leave the map until Live Tracking is restarted.
I've attached 3 ordered KML body extracted from my application (coords are set to 0 obviously):
Title: Re: Locus Live Tracking questions
Post by: Menion on July 23, 2021, 20:35:03
Hi, hmm, in this case, it is possible. Try to return in the first request - one point and in the second - different point. Does it work? What if you return in the second request just empty GPX file?

If empty GPX will work, I think it is a nice flexible solution, because it allows keeping data on the screen when no changes on the server ...
Title: Re: Locus Live Tracking questions
Post by: simperialwalker on July 26, 2021, 11:04:21
Ok, I've tried with more than one point and the other points are removed as soon as they're not included in the response. For the last point though, even empty responses or responses with empty point don't seem to work.

My final goal would be to only send points that will be displayed on map until the next response.
Title: Re: Locus Live Tracking questions
Post by: Menion on July 27, 2021, 09:32:23
Hmm, thanks for the test. I was thinking about it and is it possible for you to send a result under the 204 response code? The current version will probably report this as a failed response, but I've just updated it so the next version will correctly handle this response and also clear already visible data.
Title: Re: Locus Live Tracking questions
Post by: simperialwalker on July 27, 2021, 13:45:33
Sure, 204 No Content will be.