This object is in archive! 

Issues with network-link KML file with autorefresh for tracking buddies

Barbudor shared this problem 11 years ago
Solved

Hello


As described here : http://forum.locusmap.eu/viewtopic.ph..., I have created a KML network-link file which repeatedly calls a PHP script to retrieve buddies location from my web-based tracking application and display them in real-time in Locus. Buddies are returned as Placemark in a KML and refresh period is 10 seconds.


While this works fine, I have noticed the following issue : while the network-link KML is active, I can`t navigate anymore into Locus menus (map, data, ...) as when the refresh timer occurs, it pops me out of the menu back to the map.


This is quite annoying as I must suppress the imported data before going into the menu and them re-import again.


I also noticed the following points which are in between an issue and a enhancement request :


a) The downloaded KML file includes link to icons to represent the buddies. Unfortunately the icons are apparently downloaded at every refresh. It would be nice if the icons were cached during the session.


b) When I start a navigation (straight/compass navigation, not turn-by-turn) to one of the buddies, the navigation points toward the location of the buddy at the time he navigation is started. If the buddy moves, its icon move but the arrows/heading do not point to the new location. Would it be possible that the navigation direction is updated to follow the moving buddy ?


c) This one is definitively a feature request : I would like also to be able to follow a moving buddy by centering the map on it instead on centering it on my own GPS location.


Thanks and do not hesitate to tackle me if I didn`t do it properly. I can learn :)


Best regards,


barbudor.

Replies (28)

photo
0

I can confirm that refresh behaviour. It`s working fine for the menu or small activities, that are not replacing the map screen. But for map and data manager activity, this is really annoying. ;)


for a)


If you want to avoid that, you could pack these images into a kmz file?http://docs.locusmap.eu/doku.php/comm...


for b) and c)


This should work, if you could enter the URL to your php script directly to the location of your point.

photo
0

Hello Barbudor


quite a lot of words :)


(my important) summary after a simple short test


# Locus goes back to the mainscreen after "refreshInterval" is reached.


# Locus is not able to center this imported POI


# Locus is not able to use this POI for guiding


...and now I have three more wishes on my list :)

photo
0

Hi Berkley


Thanks.


I tried the KMZ for the initial file. I can sucessfully refer the icons from the doc.kml inside the KMZ, but the network-linked KML can`t


As I can`t post files here, I will continue this back to Locus forum : http://forum.locusmap.eu/viewtopic.ph...

photo
0

perfect summary ;)

photo
0

Hi guys,


I`m slowly investigating these mysteries around Network links. I found some problems with refresh till now anyway I`ll need some help here. To make your point b) working, there is need for some unique identifier of "buddy", so I may switch to different point as it will have same ID.


Every object in KML has parameter "ID", so is for you all possible to set this ID to some same value for same person? https://developers.google.com/kml/doc...

photo
0

Hi Menion


First thank you very much for looking into this.


With regards to your comment, as of today my experiment is basic and the downloaded KML (the one returned by the PHP script) only contains 1 place mark. And the problem I see is not that the navigation is jumping from one point to another. The problem is that when I activate the navigation, the target is the location of the buddy at the time the navigation is started. Then if the buddy moves, the icon is refreshed properly but the navigation still points to the original location.


Where so you want me to add the id ? In the tag like below ?


EDIT: How can I put XML code on the board ? Is there any [code] tag or similar ?


EDIT2 : The KML top open in Locus and the PHP script generating random buddy location is available here : https://docs.google.com/file/d/0B9Qof...

photo
0

...the target IS the POI (now with an ID)


but I think a "navigation" (like car navigation) is impossible.


A recalculation on every POI polling?


hmm, your battery will be not so happy. And the datatransfer...


a "guiding line to buddy", "center to buddy" and "follow buddy" functions will be enough.(for me)


btw.


you can paste your source in the forum.


@Menion


Now i have prepared the test POI with an ID tag.


Ready for a test

photo
0

so


a) cannot confirm. Are you sure? You may check it for example with some huge image file


b) fixed ;)


c) yes a feature request on separate topic


d) problems with return to map screen after refresh - fixed


e) also fixed some incorrect refresh timing (was called refresh twice at start) etc ...

photo
0

Hi Menion


a) Pretty sure but not sure how to proove it. I should try to use a PC as router and Wiresharl/tcpdump to check this definitively.


b) Great


d) Re-Great


e) Fantastic


:)


I`ll do another topic for c)


Many thanks


I believe it will take a few days to be released through G.Play.

photo
0

I`ll check a) with some images tomorrow and we`ll see ...


and Google Play ... forget on it for an around 2 weeks ;). Fresh test version is here http://forum.locusmap.eu/viewtopic.ph...

photo
0

@a)


I`ve tried it now:


Changed a poi icon on server side.


-> but Locus still shows the old icon.


So I think Locus cached the Icon...


...at least with my poor simple php/kml script

photo
0

Barbudor: ...c) This one is definitively a feature request : I would like also to be able to follow a moving buddy by centering the map on it instead on centering it on my own GPS location.


Menion: ...c) yes a feature request on separate topic


Barbudor: ...I`ll do another topic for c)


im waiting...

photo
0

Too busy....


here we are : https://getsatisfaction.com/locus/top...


:)

photo
0

Hi


Thanks Menion, I was not aware of the DEV version


Too busy at work, long days, not enough time to play with Locus but holidays are coming ....

photo
0

gynta, does ID work? I`m testing it now, and the results are that Guide On is not following a point. And I`m sure it has the same ID as before. Is it possible I`m doing something wrong? Maybe ID has to have some special format?

photo
0

<?xml version="1.0" encoding="UTF-8"?>


<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">


<Placemark id="1d15e0a">


<name>DLH797 - 11|968</name>


<description><![CDATA[B748: HKG->FRA


<a><img src="xxxx/1d15e0a.jpg" width="100%" align="center"></a>]]></description>


<styleUrl>#aircraftStyle255</styleUrl>


<Point>


<extrude>1</extrude>


<altitudeMode>relativeToGround</altitudeMode>


<coordinates>13.0057,51.0116,10972.8</coordinates>


</Point>


</Placemark>


</kml>

photo
0

Different planes have different IDs.

photo
0

No, guiding line to the ID don`t work anymore as before...

photo
0

hmm. is Menion working on that or would you like to create a new topic for that?

photo
0

menion is not working on this, because menion do not know, what to do first :)


anyway on 90%, Locus generate own internal ID from point name. Usually data from GPX/KML files, do not have any ID, so I generate just a "Hash" from name. Try set always same name.


Anyway as I see, better should be to use "ID" if exists ... hmm I`ll do it to next version

photo
0

Cool. Thanks for ACK.

photo
0

hmm no sorry ... internal ID is already generated from KML features ID if exists. So problem will be on different place ... I`ll check it

photo
0

uff fixed problem on your airplanes (thanks for access, thanks to this I was finally able to find a problem) .. so it will work again in next version

photo
0

great! so what was the issue?

photo
0

first issue was that in your files was also one track. This cause that all waypoints were attached to this track. When I check current guiding and new visible data, I did this check only on separate waypoints, not on waypoints in tracks (which is little bit different waypoint). Second problem appear then in one of my optimizations ... I just asked on something that not yet existed in that moment ...

photo
0

thankx. so what will be the main distinguishing feature in the new version? Placemark`s ID?

photo
0

yes it`s same now. KML Feature ID. If this id will not be available, ID will be generated from name

Replies have been locked on this page!