After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783544 - debug: print location details when updated
debug: print location details when updated
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2017-06-08 10:11 UTC by Valentin Blot
Modified: 2017-06-09 11:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch solving the bug (814 bytes, patch)
2017-06-08 10:13 UTC, Valentin Blot
none Details | Review
updated patch (825 bytes, patch)
2017-06-08 11:50 UTC, Valentin Blot
accepted-commit_now Details | Review

Description Valentin Blot 2017-06-08 10:11:35 UTC
when started with MAPS_DEBUG=true, gnome maps prints each updated location's description. On my laptop, locations never have a description so this is not very useful. The attached patch prints latitude, longitude and accuracy along with the description.
Comment 1 Valentin Blot 2017-06-08 10:13:16 UTC
Created attachment 353375 [details] [review]
patch solving the bug
Comment 2 Marcus Lundblad 2017-06-08 11:17:27 UTC
Review of attachment 353375 [details] [review]:

Thanks for the patch!
Looks good (only a few styling nitpicks)!

::: src/geoclue.js
@@ +124,3 @@
+        Utils.debug("Updated location: " + location.description
+            + " (" + location.latitude + ", " + location.longitude
+            + ", accuracy = " + location.accuracy + " m)");

I think I prefer the +'s to be at the end of the line when continuing concatenation on the next line, and then have the starting " on each line match up with the " in the beginning "Updated location:..." string.
Comment 3 Valentin Blot 2017-06-08 11:50:10 UTC
Created attachment 353378 [details] [review]
updated patch
Comment 4 Marcus Lundblad 2017-06-08 19:28:01 UTC
Review of attachment 353378 [details] [review]:

LGTM!
And it works great!
Comment 5 Marcus Lundblad 2017-06-08 19:30:43 UTC
Pushed (I modified the commit message a bit to follow our convensions, btw).
Comment 6 Valentin Blot 2017-06-08 21:11:00 UTC
Thanks! This allowed me to find a bug in geoclue:
https://bugs.freedesktop.org/show_bug.cgi?id=101357
Hopefully gnome-maps will use my GPS location on my laptop, now.
Comment 7 Marcus Lundblad 2017-06-08 21:19:44 UTC
(In reply to Valentin Blot from comment #6)
> Thanks! This allowed me to find a bug in geoclue:
> https://bugs.freedesktop.org/show_bug.cgi?id=101357
> Hopefully gnome-maps will use my GPS location on my laptop, now.

Great!

Btw, there's also the geoclue demo application (probably located under /usr/lib/geoclue-2.0/demos/where-am-i or something similar, might be distro-dependent, and maybe you needed to install a separate package, don't quite remember).
Comment 8 Valentin Blot 2017-06-09 11:47:04 UTC
Yes I use where-am-i as well, but for some reason I didn't notice that the GPS locations were reported as being 1 day old. The initial observation that made me dig into this was that gnome-maps was using the wifi-based locations rather than the gps-based ones.