[DEV] - (DEPRECATED) Locus Data API (BETA)

Started by Menion, July 01, 2011, 00:54:41

0 Members and 1 Guest are viewing this topic.

Menion

#45
hi, simple way :) - try loc.set ... Altitude, Bearing, Speed, Time (as long in millisecs since 1.1.1970)

these values will be then displayed at point info screen in Locus. And auto-refresh? Hmm you may autorefresh these points by your own by sending PointsData object with same name. This will overwrite previous points in Locus memory
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Sputnik

#46
Thanks Menion

Thats a great help. Took a little while to figure out that the time is Milliseconds (Like you said !) and not unixtime like I was doing.
Very happy now. Thanks for the API. Love this software  :D
  •  

Sputnik

#47
Hi Menion,

Thanks your api is working beautifully. I have one little problem though.  When I import my points, it is as if they arrive in locus at the wrong zoom level.  And initially they are in the wrong position. When I zoom in or out they then jump to the correct location. I was hoping you might have a suggestion for me.

Many thanks once again.
  •  

Menion

#48
Hi,
  this was issue in Locus. Fixed now ...
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Sputnik

#49
Fantastic,

I guess this will be available in the next update ?

Thanks...
  •  

Menion

#50
exactly. tomorrow probably
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Sputnik

#51
Hi Menion,

I think that problem might still be present. I noticed on a couple of occasions that the points appeared in the wrong position. I loaded the markers while viewing a zoomed in map of my location (200km from where the markers were supposed to appear). The markers showed up in my view (200km error) when I zoom in or out they then jump to their correct position.

Hope that makes sense.
  •  

Menion

#52
hmm still really? .. do you really test in on last version? ok fine, may you describe me which function you use and some short step-by-step to achieve this issue also on my phone? Thanks
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

LunaSela

#53
Hi,

what is the actual license of Locus API?

The license information on Google Code says LGPL, but the comment headers in code itself in the repository state GPL.

IMHO both are not suitable for use in non-GPL apps / extensions as AFAIK you cannot easily relink code on Android. A user (not only the App developer) has to be able to modify the Locus API lib and relink the modified version to an app if he wishes, doesn't he?
  •  

Menion

#54
ah sorry. I changed license from GPL to LGPL and forget to change headers also.

Anyway why LGPL is not suitable? LGPL just say that you may use it in non-gpl as you want, it's not a problem. Only a changes have to be reflected back to code owner. In this case it's logical. Changing Locus API without reflection to Locus itself don't have much sense.

You just cannot simply change way how Locus communicate over API  with your application without changes in Locus itself, so LGPL make sense here.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

LunaSela

#55
The LGPL requires that anybody who receives the software with a LGPL library in it to be able to change the LGPL library and link it with the application.

Example

1. Mr. Somebody downloads and uses a fictional LocosFoo.apk extension app (not open-sourced)
2. LocusFoo.apk includes Locus data library (LGPL licensed)
3. Mr. Somebody changes the Locus data library (he has access to the sources) - lets say he changes it to swap latitude and longitude before passing it to Locus
4. Mr. Somebody MUST be able to link LocosFoo.apk against the modified library so that LocusFoo.apk runs with the modified version and swaps latitude and longitude when passing data to Locus

In C++ world, this is usually done by shared library linking, the shared library could easily be exchanged. Alternatively one can ship
the non-linked object files and the user can link it against the executable.

In pure Java world, one could unpack the .jar file and exchange the .class files. (when the .jar is not signed)

In Android world is starts to get complicated. You have to open the .apk and the .dex to get the .class files again. Then you have to pack it all together and sign it with your own private key. Before reinstalling the modified version, you have to delete the original .apk as the public key / certificate changed and all stored data of the .apk is lost. I am not sure if that is still ok with LGPL.

Adding an exception like in GNU Classpath //http://www.gnu.org/software/classpath/license.html might work - or even a more liberal license like the 2 clause BSD license.

Modifing the library itself might be no problem as long as the interface to Locus does not change.But you are correct - most changes do not make sense without changing Locus too. But if the developer does that in an incompatible way, he is simply asking for trouble - and he can do that anyway even with pure GPL
  •