osmgeocoder
Advanced tools
Comparing version 0.0.1 to 0.0.2
31
index.js
@@ -20,4 +20,16 @@ /** | ||
request('http://nominatim.openstreetmap.org/search?format=json&q='+address+'&addressdetails=1', function (err, res, body) { | ||
callback(err, JSON.parse(body)); | ||
request({ | ||
url : 'http://nominatim.openstreetmap.org/search?format=json&q='+address+'&addressdetails=1', | ||
headers : { | ||
'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36' | ||
} | ||
}, function (err, res, body) { | ||
if(!err && body){ | ||
body = JSON.parse(body) | ||
} | ||
else if(err){ | ||
console.log(err); | ||
} | ||
callback(err, body); | ||
}); | ||
@@ -32,4 +44,15 @@ }, | ||
request('http://nominatim.openstreetmap.org/reverse?format=json&lat='+lat+'&lon='+lon+'&addressdetails=1', function (err, res, body) { | ||
callback(err, JSON.parse(body)); | ||
request({ | ||
url : 'http://nominatim.openstreetmap.org/reverse?format=json&lat='+lat+'&lon='+lon+'&addressdetails=1', | ||
headers : { | ||
'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36' | ||
} | ||
}, function (err, res, body) { | ||
if(!err && body){ | ||
body = JSON.parse(body); | ||
} | ||
else if(err){ | ||
console.log(err); | ||
} | ||
callback(err, body); | ||
}); | ||
@@ -36,0 +59,0 @@ } |
@@ -9,4 +9,4 @@ { | ||
"description": "Node.js client for Open Street map's geocoding service", | ||
"version": "0.0.1", | ||
"homepage": "", | ||
"version": "0.0.2", | ||
"homepage": "https://github.com/mattnull/node-osmgeocoder", | ||
"repository": { | ||
@@ -23,5 +23,23 @@ "type": "git", | ||
}, | ||
"devDependencies": { | ||
"devDependencies": {}, | ||
"optionalDependencies": {}, | ||
"readme": "OSMGeocoder\n===========\n\nSimple Open Street Map client for geocoding", | ||
"_id": "osmgeocoder@0.0.1", | ||
"dist": { | ||
"shasum": "bb95b35aa6fa10b30078b82776599f6302f22dc8", | ||
"tarball": "http://registry.npmjs.org/osmgeocoder/-/osmgeocoder-0.0.1.tgz" | ||
}, | ||
"optionalDependencies": {} | ||
"maintainers": [ | ||
{ | ||
"name": "mattnull", | ||
"email": "hello@mattnull.com" | ||
} | ||
], | ||
"directories": {}, | ||
"_shasum": "bb95b35aa6fa10b30078b82776599f6302f22dc8", | ||
"_resolved": "https://registry.npmjs.org/osmgeocoder/-/osmgeocoder-0.0.1.tgz", | ||
"_from": "osmgeocoder@0.0.1", | ||
"bugs": { | ||
"url": "https://github.com/mattnull/node-osmgeocoder/issues" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2889
53
1
1
0
1