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

North Pacific Ocean #200

Open
throbi opened this issue Nov 25, 2016 · 4 comments
Open

North Pacific Ocean #200

throbi opened this issue Nov 25, 2016 · 4 comments

Comments

@throbi
Copy link

throbi commented Nov 25, 2016

Hi,

great plugin, thanks!

I only have one issue, when trying to reverse coordinates from oceans. E.g. clicking around 7.471741, -128.427631 on Google maps shows me "North Pacific Ocean". Calling geocoder.reverse with google provider returns this error:

{ Error: Status is ZERO_RESULTS.
at c:\node_modules\node-geocoder\lib\geocoder\googlegeocoder.js:285:25
at IncomingMessage. (c:\node_modules\node-geocoder\lib\httpadapter\httpadapter.js:62:9)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
cause:
Error: Status is ZERO_RESULTS.
at c:\node_modules\node-geocoder\lib\geocoder\googlegeocoder.js:285:25
at IncomingMessage. (c:\node_modules\node-geocoder\lib\httpadapter\httpadapter.js:62:9)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9),
isOperational: true }

Would it be possible to return "North Pacific Ocean" instead?

Thanks,
Robert

@throbi
Copy link
Author

throbi commented Nov 25, 2016

Just tried to call directly the Google API: https://maps.googleapis.com/maps/api/geocode/json?latlng=7.471741,%20-128.427631, which returned
{
"results" : [],
"status" : "ZERO_RESULTS"
}

So "North Pacific Ocean" should come from another source...

@throbi
Copy link
Author

throbi commented Nov 25, 2016

Just found that geonames.org can give the right answer: http://api.geonames.org/ocean?lat=7.41343&lng=-128.427631&username=demo

<geonames>
    <ocean>
        <name>
              North Pacific Ocean
        </name>
    </ocean>
</geonames>

Would it be possible to support this service as well?

Thanks,
Robert

@nchaulet
Copy link
Owner

sure do you have time to do a pull request to add a new provider ?

@throbi
Copy link
Author

throbi commented Nov 26, 2016 via email

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

2 participants