Code Monkey home page Code Monkey logo

docs's People

Contributors

agonzalezro avatar blackxored avatar bootstraponline avatar chrissrogers avatar cvkef avatar djpowers avatar dlackty avatar evilstickman avatar floorlamp avatar goldenpavilion avatar kevin-buttercoin avatar lord avatar maks3w avatar marcguyer avatar mattes avatar mhrabiee avatar minicodemonkey avatar mjwhansen avatar moizjv avatar nicolasbonduel avatar niksamokhvalov avatar paulocoghi avatar pbechu avatar pothix avatar prayagverma avatar realityking avatar rezanachmad avatar sobstel avatar victorquinn avatar wodka avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docs's Issues

JSON inconsistencies: reverse lookups return lat/lng as numbers, forward lookups return them as strings.

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.

Fields Typo in Ruby Library Documentation

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.

Show library-specific responses

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}]}

JSON object batch request parse data in reverse way

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

image
})`

But if you reverse Object like this
let addresses = {
"555 N Highland St, Arlington VA": "1"
}

It works.

image

Have a nice day.

500 internal server error when pulling more than 200 records

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&amp;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

Incorrect Parsing of Street Address

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.

Canadian Zip Codes are dropping the last three digits during geocoding. It seems to be doing this for all the addresses I try.

See:
https://api.geocod.io/v1.7/geocode?q=1138%20Bathurst%20St,%20Toronto,%20ON%20M6G2B4,%20Canada&api_key=XXXXXXX

{
    "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)"
        }
    ]
}

Empty Reverse Geocoder Result

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=[]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.