owncloud-archive / maps

:globe_with_meridians: Maps app for ownCloud
GNU Affero General Public License v3.0
42 stars 20 forks source link

Not clear how to enable location tracking #28

Open brantje opened 10 years ago

brantje commented 10 years ago

Now, it is not clear how an user can enable device tracking. We might add an ? icon in the 'Location tracking settings' popup. What do you think @jancborchardt

jancborchardt commented 10 years ago

Yup, including a link to GPSlogger / OSMand as well. (and something for iOS)

brantje commented 10 years ago

For iOS, i have no clue. Don't have an iphone, neither have friends. So that needs to come from someone who has.

dgeo commented 9 years ago

What is the URL to use ?

DJaeger commented 9 years ago

Have looked at the source code and it seems to be for OsmAnd:

http://_YourAddressToOwnCloud_/index.php/apps/maps/api/1.0/location/update?hash=_YourDeviceHash_&lat={0}&lon={1}&timestamp={2}&hdop={3}&altitude={4}&speed={5}

You have to change YourAddressToOwnCloud to somethink like example.com/owncloud and YourDeviceHash to the Hash you generated from the gear-menu in the maps-app.

I will test it on the way to home.

DJaeger commented 9 years ago

I have created an PR to fix an issue with Osmand: #40 With that it should work like expected and the above mentioned adress.

For GPSLogger you can use the following working address: http://_YourAddressToOwnCloud_/index.php/apps/maps/api/1.0/location/update?hash=_YourDeviceHash_&lat=%LAT&lon=%LON&timestamp=%TIME&hdop=%ACC&altitude=%ALT&speed=%SPD

Also here: You have to change YourAddressToOwnCloud to somethink like example.com/owncloud and YourDeviceHash to the Hash you generated from the gear-menu in the maps-app.

DJaeger commented 9 years ago

Just to know: For GPSLogger to use with this feature you need the current version, that is not available in F-Droid. It works with location services at hight and low accuracy and also in the background (only background service and app closed).

Osmand works also with the current version from F-Droid. But it requires one of the folloing scenarios to work:

jas4711 commented 9 years ago

There is a new app called "Self-Hosted GPS Tracker" in F-Droid that appears to be able to do the right thing -- use this as the URL:

https://foo.example.org/owncloud/index.php/apps/maps/api/1.0/location/update?hash=YourDeviceHash

and it will append the lat=LAT&lon=LON string.

However the app will send start/stop pings to that URL which ends up in the database as NULL values for lat/long. Not ideal, but close.

DJaeger commented 9 years ago

I have seen this app too and have the check, how to work with this, on my todo. I also want to create some kind of documentation for location tracking.

clinique commented 8 years ago

Is maps reputed to work with the current 8.2.1 ? I currently can not manage to define devices (they are created but table populated with null values) neither to successfully call /location/update URL.

DJaeger commented 8 years ago

I have now looked into "Self-Hosted GPS Tracker". It is not able to submit hdop, altitude and speed, so they would stay empty. The timestamp is also only submitted with param "t".

@clinique: I have not checked with 8.2.1 until now. Which version of the maps app do you use? Which app with which version do you use to submit the location?

clinique commented 8 years ago

@DJaeger : I took the master version on GitHub. I'm using Owntracks along with a custom node-red to HTTP Get on maps api - but with no success. I tried directly the URL in a browser, this gives me an error stating "to many redirections". I also have errors in owncloud :

{"reqId":"RDN3OPgktV0DealUL5jl","remoteAddr":"81.61.137.133","app":"PHP","message":"Undefined index: ADR at \/usr\/share\/owncloud\/apps\/maps\/controller\/pagecontroller.php#111","level":3,"time":"2015-12-14T08:25:34+00:00"} {"reqId":"RDN3OPgktV0DealUL5jl","remoteAddr":"81.61.137.133","app":"PHP","message":"Attempt to assign property of non-object at \/usr\/share\/owncloud\/apps\/maps\/controller\/pagecontroller.php#195","level":3,"time":"2015-12-14T08:25:34+00:00"}

jancborchardt commented 8 years ago

Setting to 0.2 for now. :) Anyone is welcome to work on this and improve the Maps app