-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hi,
Thank you for developing the module. I want to make an offline geonames tool for my screen widget.
I tried the below code in the node console, it prints the latitude and longitude when I run it the first time but it spits out error on the next attempts.
var geocoder = require('geocoder.js');
var loc = "Istanbul"
geocoder(loc, function (location) {
geox = location.latitude;
geoy = location.longitude;
console.log(geox, geoy)
});
> 41.01384 28.94966
When I run it again I get:
TypeError: Cannot read property '0' of undefined
at EventEmitter.self.query (/home/trabzonspor/WORKSPACE/prayertimes-succeeder/node_modules/geocoder.js/node_modules/dblite/build/dblite.node.js:496:54)
at module.exports (/home/trabzonspor/WORKSPACE/prayertimes-succeeder/node_modules/geocoder.js/lib/index.js:20:5)
at repl:1:1
at ContextifyScript.Script.runInThisContext (vm.js:23:33)
at REPLServer.defaultEval (repl.js:339:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.onLine (repl.js:536:10)
at emitOne (events.js:101:20)
at REPLServer.emit (events.js:191:7)
Would you please help me fix it?
Regards.
Kenn
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels