I'm using the autocompleteservice from google maps api V3 to make a custom autocomplete input. I basically call this function to retrieve cities suggestions.
function getPlaces(st){
gService.getQueryPredictions({input:st,types:['geocode']},function(predictions,status) {
if(status != google.maps.places.PlacesServiceStatus.OK) return false;
for(var i = 0, prediction; prediction = predictions[i]; i++){
console.log(prediction);
}
return predictions;
});
}
This is working great, but i want to get the zip code associated to cities. Like the V2 api did, see this example.
I tried to change the types option to cities, but the result is the same. Any idea how to do that?