Author Topic: Is this possible with a locus map add-on?  (Read 1442 times)

Offline xero

  • Newbie
  • *
  • Posts: 2
    • View Profile
Is this possible with a locus map add-on?
« on: September 23, 2014, 11:37:11 »
1. Creating a new input form/popup with 2 input fields - "nickname", "password", and button "validate".
Documentation makes me think this is not possible and I can only work with existing forms and buttons via the Locus Map API.

2. Authentication? I want plugin functionality only to be accessible to authorized users. If they don't provide a valid username/password which are validated in third party database, they can't access the plugin functionality.
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10003
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Is this possible with a locus map add-on?
« Reply #1 on: September 23, 2014, 12:33:17 »
Hello xero,

may you please describe what you approximately wants to do? Locus API is complete intent/broadcasts based API that have no influence on UI you'll do. So it's just on you what you create. API for Locus only helps you, to send orders (data) to Locus and also receive some responses.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline xero

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Is this possible with a locus map add-on?
« Reply #2 on: September 25, 2014, 13:01:52 »
Hello menion, thanks for using your time to answer me!

I wanted to create a plugin for Locus Map which has a new input form(name, password) and provides authentication via some third party service. After reading Locus Map documentation, I think it is not possible.

So, I have to create a separate, native Android app and communicate with Locus via API?

My scenario is like this:
1. User provides name and password
2. Server validates the user
3. User submits his geolocation to server every x minutes
4. Server responds with KML file with features close to the user
5. KML file is shown in Locus Map

Is this possible with using Locus Map?
 

Offline gynta

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 3518
  • Thanked: 25 times
    • View Profile
    • Locus live tracking service
  • Device: SGS5m (4.4.2 root), SGTab10.1 (4.0.4)
Re: Is this possible with a locus map add-on?
« Reply #3 on: September 25, 2014, 13:31:14 »
livetracking
- send coords, pass,...via get / post  to server.
- download netlink.kml from server
- inport to locus
- inside this kml the position will be updated

allready exists as an test service..

BUT
Locus can't follow/center this object
I think we need to have patience..

buddy tracking inside Locus (pull pos from a server)  is planed
-> http://forum.locusmap.eu/index.php?topic=4127.msg31702#msg31702

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 10003
  • Thanked: 64 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Is this possible with a locus map add-on?
« Reply #4 on: September 25, 2014, 13:40:01 »
I wanted to create a plugin for Locus Map which has a new input form(name, password) and provides authentication via some third party service. After reading Locus Map documentation, I think it is not possible.

So, I have to create a separate, native Android app and communicate with Locus via API?

API for Locus do not have tools for creating UI of your own app. It's purpose is exactly as you wrote - to allow other native apps!! communicate with Locus.

My scenario is like this:
1. User provides name and password
2. Server validates the user
3. User submits his geolocation to server every x minutes
4. Server responds with KML file with features close to the user
5. KML file is shown in Locus Map

Is this possible with using Locus Map?

Yes it is.
1. your application
2. your application
3. your application register Broadcast receiver that will receive every second 'Periodic updates' from Locus where will be users location any many other information
4. your application
5. dynamic display of any file is also possible in Locus over API. It's not even needed to be KML file. You may create "Waypoints" objects from KML or any other format directly in your app and send to Locus just a list of waypoints.

So, points 3. and 5. are based on Locus API. Currently there is no perfect documentation and I usually wrote to other developers to test Sample application, where should be everything visible on samples. Anyway if you'll try to do some such app, feel free to write me and I'll gladly help or at least improve existing manual a little bit.

http://docs.locusmap.eu/doku.php?id=manual:locus_api

EDIT: gynta was faster :). Because here is need for some login, I suggested method over API. Anyway gynta's method should work as well and it's a lot more simplier.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!