Author Topic: Display live positions from 3rd party tracker  (Read 214 times)

Offline mattsches

  • Newbie
  • *
  • Posts: 2
    • View Profile
  • Device: Xiaomi Mi A1
Display live positions from 3rd party tracker
« on: September 25, 2019, 11:03:02 »
Hi everyone,

I've been struggling with this for a while now: I want to use an Android app (preferably Locus Map, of course) to display the live positions of family members on a map. Just like Google Map or Locus Live Tracking - but using my own custom server as a backend.

And I want to use a 3rd party tracker (currently evaluating Owntracks, Traccar, Nextcloud Phonetrack) to report my (and other people's) position to my server.

Is Locus Map capable of automatically polling positions/geo coordinates from an arbitrary URL and displaying the respective icons on a map?

So the workflow is as follows: The tracker app (let's assume Owntracks) reports my wife's position to my server -> it's written into a DB or a file -> every minute or so Locus requests the lat/lon values from a specific URL (e.g. https://myserver.example/position.php?user=1) -> I see the position updated in Locus Map every 60s.

Maybe I'm thinking too hard, or maybe this is a strange use case? Yet that's what I'm trying to achieve.

I'd appreciate any help!

Regards,
Matthias
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11506
  • Thanked: 334 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Display live positions from 3rd party tracker
« Reply #1 on: September 25, 2019, 14:21:59 »
Hello Matthias,

this is definitely not some crazy unique use-case.

Please check also topic and mainly my response here: https://help.locusmap.eu/topic/live-tracking-via-webservice#comment-39912 . It should be exactly what you are looking for.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline zossebart

  • Apprentice of Locus
  • **
  • Posts: 165
  • Thanked: 22 times
    • View Profile
  • Device: Sony Z1 Compact
Re: Display live positions from 3rd party tracker
« Reply #2 on: September 26, 2019, 09:35:52 »
Hello Matthias,

this is definitely not some crazy unique use-case.

Please check also topic and mainly my response here: https://help.locusmap.eu/topic/live-tracking-via-webservice#comment-39912 . It should be exactly what you are looking for.

Do I understand it correctly, that this solution requires you to have livetracking active by yourself? This means you have to give out your position in order to receive the positions of others?

Maybe another solution would be to implement a service which is queryable by a kml file...?
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11506
  • Thanked: 334 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Display live positions from 3rd party tracker
« Reply #3 on: September 26, 2019, 11:45:57 »
Yes exactly. Every time you send your position out to the server, Locus receive and display data from the server on the map.

To just fetch data, you do not need any service integrated into the Locus. You may simply use already existing network links over KML files.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline mattsches

  • Newbie
  • *
  • Posts: 2
    • View Profile
  • Device: Xiaomi Mi A1
Re: Display live positions from 3rd party tracker
« Reply #4 on: September 26, 2019, 16:52:58 »
Hi menion,

thanks a lot for your nice and helpful reply.

I got the Live Tracking approach working with my own server, great stuff! Only thing is that I needed to obtain a GPS fix (or use simulation mode) before Locus Map could successfully connect to the server.

And I was also puzzled that I had to publish my position, but I opted to just ignore it server-side *shrug*

However, up until now, I hadn't heard about KML NetworkLinks, thanks a lot for enlightening me ;) I think that this might be an even better option for my use case.

I will play around with both options for a bit and let you know how it works out.