Autocomplete results returns with no Lat/Lng

315 views
Skip to first unread message

arclyte

unread,
Sep 16, 2011, 3:57:58 PM9/16/11
to google-map...@googlegroups.com
Hello,

Sorry I don't have any test code up at the moment, but this seems to be something inherent to the Places Autocomplete code and not my implementation... I'm developing a web app in sync with another developer who's doing it for iOS.  We're using the Places Autocomplete libraries (me the JS and he the Web Service).  The site/app is centered on NYC so we're mostly searching around Manhattan.  I noticed a few days ago and he recently confirmed that certain searches that come up in the autocomplete predictions don't return a latitude and longitude - sometimes.  I think my coworker has narrowed it down a bit since he was playing with the predictions.

With the map bounded to NYC, typing in 'H' brings up 'Home Depot, 3rd Avenue, NY' as an option.  If you select that, it doesn't return the Lat/Lng.  Now with it selected if you click on the autocomplete textbox it brings up 'Home Depot, 3rd Avenue, NY' as a suggestion again.  Clicking that will now return the Lat/Lng.  My coworker noticed that if you type in 'Hom' and click it it will respond with the Lat/Lng so he's not calling the autocomplete code until they have entered at least 3 characters to get around this, but I don't seem to have that luxury using the JS version.

Is this something I should report as a bug or is something else going on here that I'm missing?

Thanks,

Jim

Chris Broadfoot

unread,
Sep 17, 2011, 7:57:06 AM9/17/11
to google-map...@googlegroups.com
Hi Jim,

Can you provide a link that reproduces this issue?

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/xyVt4OiZJ5wJ.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

arclyte

unread,
Sep 19, 2011, 10:07:38 AM9/19/11
to google-map...@googlegroups.com
The autocomplete is tied to the main search box on this page:

http://park.mydevstaging.com/

If you type "H", the 4th prediction is "Home Depot, 3rd Avenue, NY".  If you choose a valid address, the form should submit with the map centered on that location, but that particular one won't submit because it has no lat/lng attached.  If you then click on the autocomplete field and select it again it'll submit/grab the location.

annette

unread,
Nov 16, 2011, 4:01:39 AM11/16/11
to Google Maps JavaScript API v3
Hi , I'd be interested to know how you solved this as I'm having a
similar problem with autocomplete except I never get the latlng on
subsequent attempts - I always get status=zero_results from the
geocoder. Thanks

annette

unread,
Nov 16, 2011, 4:18:37 AM11/16/11
to Google Maps JavaScript API v3
Ah realised by searching this group that I shoould be using the places
search and not geocoder
Reply all
Reply to author
Forward
0 new messages