geocodio / docs Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ringcentral/slate
geocod.io API documentation
Home Page: https://www.geocod.io/docs/
License: Apache License 2.0
This project forked from ringcentral/slate
geocod.io API documentation
Home Page: https://www.geocod.io/docs/
License: Apache License 2.0
On the right side where the code is posted, it says:
const geocodio = new Geocodio('YOUR_API_KEY');
when it should say
const geocoder = new Geocodio('YOUR_API_KEY');
I just ran into an issue where my JSON parser was failing because lat
and lng
are returned as strings for geocoding lookups, but returned as numbers for reverse geocoding lookups.
For example:
# https://api.geocod.io/v1/reverse?q=38.9002898,-76.9990361&api_key=API_KEY
"location": {
"lat": 38.900203,
"lng": -76.999507
}
# https://api.geocod.io/v1/geocode?q=washington+dc&api_key=API_KEY
"location": {
"lat": "38.893311",
"lng": "-77.014647"
}
According to your documentation (geocoding lookup, reverse geocoding lookup), they should be returned as numbers in both situations.
When implementing Geocodio integration and passing in parameters to .geocode()
, the :fields
parameter leads to a NameError.
NameError in ApiCallsController#call_geocodio
undefined local variable or method `w' for #<ApiCallsController:0x00000000025328>
I believe this is a typo and that it should be the fields:
parameter instead.
For example:
location = geocodio.geocode(['1109 N Highland St, Arlington VA'], :fields %w[census2010 census])
Should be:
location = geocodio.geocode(['1109 N Highland St, Arlington VA'], fields: %w[census2010 census])
This will likely need to be updated for each of the available appended fields.
I did a test GET against an address in AL and noticed that the data for senators didn't reflect Doug Jones' recent election to the Senate. In the response it says you are sourcing from https://github.com/unitedstates/. Looks like you need to run the scraping scripts more frequently than you already do.
I think it might be confusing for users to see pure JSON responses under the language-specific library docs. Not sure the best way to do this but it might be better to show what's returned by each library if possible. For example, this function in the rodeo library:
(single "42370 Bob Hope Drive, Rancho Mirage CA")
Returns the following Clojure map:
{:input
{:address_components
{:number "42370",
:street "Bob Hope",
:suffix "Dr",
:city "Rancho Mirage",
:state "CA"},
:formatted_address "42370 Bob Hope Dr, Rancho Mirage, CA"},
:results
[{:address_components
{:number "42370",
:street "Bob Hope",
:suffix "Dr",
:city "Rancho Mirage",
:county "Riverside County",
:state "CA",
:zip "92270"},
:formatted_address "42370 Bob Hope Dr, Rancho Mirage, CA 92270",
:location {:lat 33.738987255507, :lng -116.40833849559},
:accuracy 1}
{:address_components
{:number "42370",
:street "Bob Hope",
:suffix "Dr",
:city "Rancho Mirage",
:county "Riverside County",
:state "CA",
:zip "92270"},
:formatted_address "42370 Bob Hope Dr, Rancho Mirage, CA 92270",
:location {:lat 33.738980796909, :lng -116.40833917329},
:accuracy 0.8}]}
Hi.
I try to send batch data to geocode API using this example.
let addresses = {
"1": "555 N Highland St, Arlington VA"
}
But instead of returning correct address API tries to parse values from KEY property instead of VALUE property.
Example code in NodeJs
`request.post({url: baseUrl, form: {data: JSON.stringify(addresses)} } ,(e, r, body) =>{
//you will see in response that address is missing completelly
But if you reverse Object like this
let addresses = {
"555 N Highland St, Arlington VA": "1"
}
It works.
Have a nice day.
Fatal error: Uncaught exception 'Guzzle\Http\Exception\ServerErrorResponseException' with message 'Server error response
[status code] 500
[reason phrase] Internal Server Error
[url] http://api.geocod.io/v1/geocode?q=KM%2B19.5%2BCarretera%2BEsc%C3%A9nica%2BTijuana%2B-%2BEnsenada%2B%2BRosarito%2BCA&api_key=3ef118e616ce38de613a5171c8556de4166eccc' in D:\xampp\htdocs\ph-rets\vendor\guzzle\http\Guzzle\Http\Exception\BadResponseException.php:43
Stack trace:
#0 D:\xampp\htdocs\ph-rets\vendor\guzzle\http\Guzzle\Http\Message\Request.php(145): Guzzle\Http\Exception\BadResponseException::factory(Object(Guzzle\Http\Message\Request), Object(Guzzle\Http\Message\Response))
#1 [internal function]: Guzzle\Http\Message\Request::onRequestError(Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 D:\xampp\htdocs\ph-rets\vendor\symfony\event-dispatcher\EventDispatcher.php(158): call_user_func(Array, Object(Guzzle\Common\Event), 'request.error', Object(Symfony\Component\EventDispatcher in D:\xampp\htdocs\ph-rets\vendor\guzzle\http\Guzzle\Http\Exception\BadResponseException.php on line 43
I'm having an issue with the parsing of street information in geocod.io requests. It appears that the endpoint is chopping off the remainder of the street and only returning the number in it's initial lookup.
The address format appears to be correct in my request and the returned response query from the endpoint.
Request
{
"id": "c813a8a5-f758-1008-7394-5702ae933bd1",
"lat": null,
"lng": null,
"street": "1567 SW Chandler Ave.",
"city": "Bend",
"country": "USA",
"zip": "97702",
"state": "Oregon"
}
Response
"response": {
"input": {
"address_components": {
"number": "1567",
"city": "Bend",
"state": "OR",
"country": "US"
},
"formatted_address": "1567, Bend, OR"
},
"results": [
{
"address_components": {
"city": "Bend",
"county": "Deschutes County",
"state": "OR",
"zip": "97701",
"country": "US"
},
"formatted_address": "Bend, OR 97701",
"location": {
"lat": 44.082037,
"lng": -121.227125
},
"accuracy": 0.33,
"accuracy_type": "place",
"source": "TIGER/Line® dataset from the US Census Bureau"
},
{
"address_components": {
"city": "Bend",
"county": "Deschutes County",
"state": "OR",
"zip": "97702",
"country": "US"
},
"formatted_address": "Bend, OR 97702",
"location": {
"lat": 43.998448,
"lng": -121.260298
},
"accuracy": 0.33,
"accuracy_type": "place",
"source": "TIGER/Line® dataset from the US Census Bureau"
},
...
Canadian Zip Codes are dropping the last three digits during geocoding. It seems to be doing this for all the addresses I try.
{
"input": {
"address_components": {
"number": "1138",
"street": "Bathurst",
"suffix": "St",
"formatted_street": "Bathurst St",
"city": "Toronto",
"state": "ON",
"zip": "M6G 2B4",
"country": "CA"
},
"formatted_address": "1138 Bathurst St, Toronto, ON M6G 2B4"
},
"results": [
{
"address_components": {
"number": "1138",
"street": "Bathurst",
"suffix": "St",
"formatted_street": "Bathurst St",
"city": "Toronto",
"state": "ON",
"zip": "M5R",
"country": "CA"
},
"formatted_address": "1138 Bathurst St, Toronto, ON M5R",
"location": {
"lat": 43.675909,
"lng": -79.415761
},
"accuracy": 0.9,
"accuracy_type": "rooftop",
"source": "City of Toronto (Open Government Licence – Toronto Contains information licensed under the Open Government Licence – Toronto)"
}
]
}
When i pass latitude and longtitude i get empty array for a valid co ordinates
please do help to fix this issue
location = client.reverse((9.652083,-63.62359))
iam getting :- results=[]
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.