Giter Site home page Giter Site logo

Place types about googleapi HOT 7 CLOSED

vivet avatar vivet commented on August 19, 2024
Place types

from googleapi.

Comments (7)

vivet avatar vivet commented on August 19, 2024 1

Ok thanks for the data.
Will look into it soon

from googleapi.

vivet avatar vivet commented on August 19, 2024 1

The issue has been fixed, PR merged and nuget package published.

from googleapi.

vivet avatar vivet commented on August 19, 2024

Hi.
I just took a quick look, and unless i am wrong geocoding use maps api location types, and what you are referring to is for place searches and additions. A while ago I noticed that the support is different for the two api, or Google documentation is a bit confusing.

If you can try post your request data, i can try reproduce your case.

from googleapi.

kbalint avatar kbalint commented on August 19, 2024

hi, thanks for the quick answer.
The request url is: https://maps.google.com/maps/api/geocode/json?key=AIza...&language=hu&address=Budapest%20karin&region=hu

The response is:

{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "75",
               "short_name" : "75",
               "types" : [ "street_number" ]
            },
            {
               "long_name" : "Fóti út",
               "short_name" : "Fóti út",
               "types" : [ "route" ]
            },
            {
               "long_name" : "IV. kerület",
               "short_name" : "IV. kerület",
               "types" : [ "political", "sublocality", "sublocality_level_1" ]
            },
            {
               "long_name" : "Budapest",
               "short_name" : "Budapest",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "Magyarország",
               "short_name" : "HU",
               "types" : [ "country", "political" ]
            },
            {
               "long_name" : "1047",
               "short_name" : "1047",
               "types" : [ "postal_code" ]
            }
         ],
         "formatted_address" : "Budapest, Fóti út 75, 1047 Magyarország",
         "geometry" : {
            "location" : {
               "lat" : 47.5775859,
               "lng" : 19.092553
            },
            "location_type" : "ROOFTOP",
            "viewport" : {
               "northeast" : {
                  "lat" : 47.5789348802915,
                  "lng" : 19.0939019802915
               },
               "southwest" : {
                  "lat" : 47.5762369197085,
                  "lng" : 19.0912040197085
               }
            }
         },
         "place_id" : "ChIJSR65OBfaQUcR_GZAMfB2tfQ",
         "types" : [ "establishment", "lodging", "point_of_interest" ]
      }
   ],
   "status" : "OK"
}

where the type is "lodging", which is valid according to the documentation, but lacking in the Enum.
If the seachstring is "Budapest Karinthy", the type "school" comes up.

I've recently encountered the following values: food, department_store, home_goods_store, lodging, university, school, cafe, bar, church, hospital.

from googleapi.

vivet avatar vivet commented on August 19, 2024

Hi
I have made a fix. I will release a Nuget package soon, but you can try the branch if you like.

from googleapi.

kbalint avatar kbalint commented on August 19, 2024

thanks! I'll test it and get back to you if needed

from googleapi.

vivet avatar vivet commented on August 19, 2024

Cool.
I did perform some integration tests, and determined that 'unknown' is now returned when no enum value exists for a string location type.
Let me know how it works out.

from googleapi.

Related Issues (20)

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.