Skip to content

Instantly share code, notes, and snippets.

@sigurdga
Last active December 12, 2015 04:28
Show Gist options
  • Save sigurdga/4714736 to your computer and use it in GitHub Desktop.
Save sigurdga/4714736 to your computer and use it in GitHub Desktop.
Trying to use gjs to do geocode queries… I found a small example in python, and converted it to javascript: http://cheesehead-techblog.blogspot.no/2012/11/geoclue-vs-geocode-glib.html My javascript version does not work - I don't get any results. And I just checked and saw that copy-pasting the python code also got no results back.
const GeocodeGlib = imports.gi.GeocodeGlib;
let location = new GeocodeGlib.Object();
location.add('city','Milwaukee');
let result = location.resolve();
print(result);
@sigurdga
Copy link
Author

sigurdga commented Feb 5, 2013

Output:

JS ERROR: !!!   Exception was: GeocodeGlib.Error: No matches found for request
JS ERROR: !!!     message = '"No matches found for request"'
JS ERROR: !!!     fileName = '"geocode-example2.js"'
JS ERROR: !!!     lineNumber = '6'
JS ERROR: !!!     stack = '"0 <TOP LEVEL>@geocode-example2.js:6
"'
GeocodeGlib.Error: No matches found for request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment