nchaulet/node-geocoder

change from openstreetmaps to HERE but it doesn't work

Closed this issue · 1 comments

Hi,
my plan is to switch from openstreetmaps to HERE. As I'm a beginner, can you please help me to get it done properly?
I have already an API key from HERE. The test example gives me an error. Therefore I ask for help.
Even with the description it's impossible for me to get it work.

Thanks in advance

This is my current code:

`var NodeGeocoder = require('node-geocoder');

var options = {
provider: 'openstreetmap',
httpAdapter: 'https', // Default
apiKey: ' ', // for Mapquest, OpenCage, Google Premier
formatter: 'json' // 'gpx', 'string', ...
};

var geocoder = NodeGeocoder(options);

geocoder.reverse({lat:xx.xxxxxx, lon:xx.xxxxxx}, function(err, res) {
console.log(res);
console.log(res[0].city);
console.log(res[0].state);
console.log(res[0].zipcode);
console.log(res[0].streetName);
console.log(res[0].streetNumber);
});`

I use nodejs-geolocation which works perfectly with here