chadly/Geocoding.net — pull request #18 by marknitek (2014-05-22 10:07:18+00:00)
Title: Removed types array length exception

There are results where the AddressComponent does not provide any "types", this is the case when you try to geocode the address "Rapidplatz 8953 Dietikon" (http://maps.googleapis.com/maps/api/geocode/json?address=Rapidplatz+8953+Dietikon&sensor=true).

The result looks like this:

"address_components" : [
{
"long_name" : "Rapidplatz",
"short_name" : "Rapidplatz",
"types" : []
},
{
"long_name" : "Dietikon",
"short_name" : "Dietikon",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Zürich",
"short_name" : "ZH",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Schweiz",
"short_name" : "CH",
"types" : [ "country", "political" ]
},
{
"long_name" : "8953",
"short_name" : "8953",
"types" : [ "postal_code" ]
}
],

As you can see the types array is empty.