vue-google-autocomplete icon indicating copy to clipboard operation
vue-google-autocomplete copied to clipboard

Missing "postal_town" key

Open YonniRouelle opened this issue 2 years ago • 1 comments

In ADDRESS_COMPONENTS constant, it misses postal_town: 'long_name' key / value to support address that haven't locality key. For example, this is the value returns by the method autocomplete.getPlace() for an address in London

"address_components": [
  {
    "long_name": "42",
    "short_name": "42",
    "types": [
      "street_number"
    ]
  },
  {
    "long_name": "Newington Causeway",
    "short_name": "Newington Causeway",
    "types": [
      "route"
    ]
  },
  {
    "long_name": "London",
    "short_name": "London",
    "types": [
      "postal_town"
    ]
  },
  {
    "long_name": "Greater London",
    "short_name": "Greater London",
    "types": [
      "administrative_area_level_2",
      "political"
    ]
  },
  {
    "long_name": "England",
    "short_name": "England",
    "types": [
      "administrative_area_level_1",
      "political"
    ]
  },
  {
    "long_name": "United Kingdom",
    "short_name": "GB",
    "types": [
      "country",
      "political"
    ]
  },
  {
    "long_name": "SE1 6DR",
    "short_name": "SE1 6DR",
    "types": [
      "postal_code"
    ]
  }
]

YonniRouelle avatar Sep 19 '22 10:09 YonniRouelle

It also misses the premise type, which makes it borderline useless for autocompletion in the Czech republic

TomasPodivinskyCoding avatar Nov 18 '22 14:11 TomasPodivinskyCoding