wyattdanger / geocoder Goto Github PK
View Code? Open in Web Editor NEWnode.js module to geocode through google developer api
License: MIT License
node.js module to geocode through google developer api
License: MIT License
I will try to keep maintained version there: https://www.npmjs.com/package/@picryl/geocoder
Fork is here: https://github.com/picryl/geocoder
hi, i m fresh to use geocoder nodejs. but i cant found the function to release or end the connection..soon, i can't make new any connection in my code. so ,if it has one? which one?
If you try to do a reverseGeocode on a location on the prime meridian or the equator (lat===0 or lon===0) you get an error because of the input validation here:
Line 71 in 578e795
if(undefined !== lat || undefined !== lon){}" would fix this!
i am trying to use this module with react native and expo sdk
once installed the package and imported it i get an error message that dynamic require is not supported
specifically in the index.js file line 47
this.providerObj = require("./providers/"+name);
any help ?
thanks
SInce geocoder.geocode()
takes a callback as its second to last argument, I found this module to be more difficult than usual to promisify using something like bluebird
's promisifyAll()
function.
Have you ever tried this? Do you have any tips?
Just coding as per example
geocoder.geocode("Atlanta, GA", function ( err, data ) {
console.log(data);
}, { key: 'API KEY' });
and get undefined returned
GEOCODER Yahoo API] uri: http://where.yahooapis.com/geocode
[GEOCODER Yahoo API] options: {"q":"46.68665796636226, -117.16076862334485","gflags":"R","flags":"J","appid":"**********"}
[GEOCODER Yahoo API] body: <HTML>
<HEAD>
<TITLE>Error</TITLE>
</HEAD>
<BODY BGCOLOR="white" FGCOLOR="black">
<!-- status code : 400 -->
<!-- Error: GET -->
<!-- host machine: r15.ycpi.sjb.yahoo.net -->
<!-- timestamp: 1408150103.000 -->
<!-- url: http://where.yahooapis.com/geocode?q=46.68665796636226%2C%20-117.16076862334485&gflags=R&flags=J&appid=*****---->
<H1>Error</H1>
<HR>
<FONT FACE="Helvetica,Arial"><B>
Description: Could not process this "GET" request.
</B></FONT>
<HR>
</BODY>
Any idea what's up?
It'd be great to be able to pass context in. Something like:
var obj = {
foo: 0,
callback: function(){
this.foo++;
console.log( foo );
}
};
geocoder.geocode("Atlanta, GA", obj.callback, obj);
Should log 1
When I initialize: var geocoder = require('geocoder');
i get following error:
Cannot find module './providers/google'
I made a pull request to resolve the issue
How do we specify the Google API credentials while using geocoder?
uncaughtException: Unexpected token <
SyntaxError: Unexpected token <
at Object.parse (native)
at IncomingMessage.<anonymous> (/mnt/data/www/services/releases/20141029123717/node_modules/geocoder/index.js:41:21)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:929:16
at process._tickCallback (node.js:419:13)
It's been a while since last commit.
A simple dependencies refresh would be a good start ?
Vulnerability reported are increasing...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.