google maps - use AutocompleteService to fetch route, streetnumber, etc? -
i need query google-places-api fetch street, street number, city , country partial address "1 main street, south bend".
when use google.maps.places.autocomplete
way result service attach listener input field looks user selection (user chooses result list).
in case object defined fields "route" (street), "street number", etc.
when want address object programmatically found autocompleteservice class. when using class fields not named 'route' or 'street' or 'street number'. array of values.
sometimes
terms[0]['value] = 'main street', terms[1]['value] = '7', terms[2]['value] = 'south bend', terms[3]['value] = 'indiana',
sometimes
terms[0]['value] = 'other street 32', terms[1]['value] = 'south bend', terms[2]['value] = 'indiana',
so there no way sure if street number has been separated different field , in terms array field kind of value find (street, number, city, etc.)
is there way query google.maps.places
partial address '1 main street, south bend' , object (best or first match) gives me array address fields named , street + street number separated?
Comments
Post a Comment