Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change from openstreetmaps to HERE but it doesn't work #353

Closed
moses19850 opened this issue Feb 22, 2024 · 1 comment
Closed

change from openstreetmaps to HERE but it doesn't work #353

moses19850 opened this issue Feb 22, 2024 · 1 comment

Comments

@moses19850
Copy link

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);
});`

@moses19850
Copy link
Author

I use nodejs-geolocation which works perfectly with here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant