The thing is, for my application I always get a lot of results with
different types, which are actually not needed. Since it is a mobile
application, I am striving to minimize the network data load. For example, I
only want to have the the building's street number + street name + post code
+ city name + country name, instead of the following example. Thank you!
/*************************************************************************************************************/
"status": "OK",
"results": [ {
"types": [ "street_address" ],
"formatted_address": "Ballindamm 35, 20095 Hamburg, Germany",
"address_components": [ {
"long_name": "35",
"short_name": "35",
"types": [ "street_number" ]
}, {
"long_name": "Ballindamm",
"short_name": "Ballindamm",
"types": [ "route" ]
}, {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "sublocality", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "locality", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "HH",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "Germany",
"short_name": "DE",
"types": [ "country", "political" ]
}, {
"long_name": "20095",
"short_name": "20095",
"types": [ "postal_code" ]
} ],
"geometry": {
"location": {
"lat": 53.5524400,
"lng": 9.9960500
},
"location_type": "ROOFTOP",
"viewport": {
"southwest": {
"lat": 53.5492924,
"lng": 9.9929024
},
"northeast": {
"lat": 53.5555876,
"lng": 9.9991976
}
}
}
}, {
"types": [ "postal_code" ],
"formatted_address": "20095 Hamburg, Germany",
"address_components": [ {
"long_name": "20095",
"short_name": "20095",
"types": [ "postal_code" ]
}, {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "locality", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "HH",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "Germany",
"short_name": "DE",
"types": [ "country", "political" ]
} ],
"geometry": {
"location": {
"lat": 53.5507515,
"lng": 10.0017259
},
"location_type": "APPROXIMATE",
"viewport": {
"southwest": {
"lat": 53.5452032,
"lng": 9.9911572
},
"northeast": {
"lat": 53.5569730,
"lng": 10.0075570
}
},
"bounds": {
"southwest": {
"lat": 53.5452032,
"lng": 9.9911572
},
"northeast": {
"lat": 53.5569730,
"lng": 10.0075570
}
}
}
}, {
"types": [ "sublocality", "political" ],
"formatted_address": "Altstadt, Hamburg, Germany",
"address_components": [ {
"long_name": "Altstadt",
"short_name": "Altstadt",
"types": [ "sublocality", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "locality", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "HH",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "Germany",
"short_name": "DE",
"types": [ "country", "political" ]
} ],
"geometry": {
"location": {
"lat": 53.5504005,
"lng": 9.9941683
},
"location_type": "APPROXIMATE",
"viewport": {
"southwest": {
"lat": 53.5368750,
"lng": 9.9792870
},
"northeast": {
"lat": 53.5572320,
"lng": 10.0070996
}
},
"bounds": {
"southwest": {
"lat": 53.5368750,
"lng": 9.9792870
},
"northeast": {
"lat": 53.5572320,
"lng": 10.0070996
}
}
}
}, {
"types": [ "administrative_area_level_2", "political" ],
"formatted_address": "Hamburg, Germany",
"address_components": [ {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "HH",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "Germany",
"short_name": "DE",
"types": [ "country", "political" ]
} ],
"geometry": {
"location": {
"lat": 53.5363318,
"lng": 9.9945216
},
"location_type": "APPROXIMATE",
"viewport": {
"southwest": {
"lat": 53.3951180,
"lng": 8.4201604
},
"northeast": {
"lat": 53.9646546,
"lng": 10.3251990
}
},
"bounds": {
"southwest": {
"lat": 53.3951180,
"lng": 8.4201604
},
"northeast": {
"lat": 53.9646546,
"lng": 10.3251990
}
}
}
}, {
"types": [ "administrative_area_level_1", "political" ],
"formatted_address": "Hamburg, Germany",
"address_components": [ {
"long_name": "Hamburg",
"short_name": "HH",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "Germany",
"short_name": "DE",
"types": [ "country", "political" ]
} ],
"geometry": {
"location": {
"lat": 53.5363318,
"lng": 9.9945216
},
"location_type": "APPROXIMATE",
"viewport": {
"southwest": {
"lat": 53.3951180,
"lng": 8.4201604
},
"northeast": {
"lat": 53.9646546,
"lng": 10.3251990
}
},
"bounds": {
"southwest": {
"lat": 53.3951180,
"lng": 8.4201604
},
"northeast": {
"lat": 53.9646546,
"lng": 10.3251990
}
}
}
}, {
"types": [ "locality", "political" ],
"formatted_address": "Hamburg, Germany",
"address_components": [ {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "locality", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "Hamburg",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "Hamburg",
"short_name": "HH",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "Germany",
"short_name": "DE",
"types": [ "country", "political" ]
} ],
"geometry": {
"location": {
"lat": 53.5538148,
"lng": 9.9915752
},
"location_type": "APPROXIMATE",
"viewport": {
"southwest": {
"lat": 53.3999990,
"lng": 9.7321510
},
"northeast": {
"lat": 53.7171450,
"lng": 10.1234920
}
},
"bounds": {
"southwest": {
"lat": 53.3999990,
"lng": 9.7321510
},
"northeast": {
"lat": 53.7171450,
"lng": 10.1234920
}
}
}
}, {
"types": [ "country", "political" ],
"formatted_address": "Germany",
"address_components": [ {
"long_name": "Germany",
"short_name": "DE",
"types": [ "country", "political" ]
} ],
"geometry": {
"location": {
"lat": 51.1656910,
"lng": 10.4515260
},
"location_type": "APPROXIMATE",
"viewport": {
"southwest": {
"lat": 47.2701270,
"lng": 5.8662579
},
"northeast": {
"lat": 55.0815000,
"lng": 15.0418321
}
},
"bounds": {
"southwest": {
"lat": 47.2701270,
"lng": 5.8662579
},
"northeast": {
"lat": 55.0815000,
"lng": 15.0418321
}
}
}
} ]
}
)
/*************************************************************************************************************/
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.