paul February 2016

Google Maps API vs Google Maps Site Autocomplete results specificity

  1. So attempting to return results using Google Maps API. I'm also using googlemaps.places.Autocomplete for the origin and destination boxes. Oddly, I'm seeing a difference between it and how it works on maps.google.com.

Example: through Google Maps API origin: I start typing "McDonald's, Woodruff Rd, Greenville, SC 29607. after selecting it that is exactly what it puts into the route calculation.

through Google Maps site (maps.google.com), origin: I start typing "McDonald's, Woodruff Rd, Greenville, SC 29607. after selecting it, however, Google is resolving it to a more specific address, McDonald's, 1111 Woodruff Rd, Greenville, SC 29607.

Obviously then the Google Maps route is more accurate/precise. Why is this altering of the selected address not happening through Google Maps API? is it an additional api call I need to use?

screenshot reference: http://cl.ly/2n3P1220042v

  1. Also, the route directions through the API seems to drop the establishment name, leaving just the address. Google Maps site keeps the establishment name. How do I keep it through using the API?

any help is appreciated.

Answers


geocodezip February 2016

The place object returned by the google.maps.places.Autocomplete service has a formatted_address property which contains the address you are looking for.

input: "McDonald's, Woodruff Rd, Greenville, SC 29607"

formatted_address: "1111 Woodruff Rd, Greenville, SC 29607, United States"

Post Status

Asked in February 2016
Viewed 1,863 times
Voted 8
Answered 1 times

Search




Leave an answer