Geocoder not Geocoding Properly

31 views
Skip to first unread message

Sam

unread,
Jun 15, 2011, 12:30:40 PM6/15/11
to google-map...@googlegroups.com
I am having an issue with the geocoder that I am hoping someone can help me with.

On my website http://stage.specialsagent.com if you enter Chicago and submit it will try to geo on "Chicago, IL" notice the space, however if you geo on "Chicago,IL" (no space) it says that google found zero results. (If you enter "Chicago, IL",  it strips the space between the comma and the I and fails.)

If however you change the case to "Chicago,il" it works fine again.  The reverse happens with "Austin, TX" no space succeeds where a space fails (entering Austin on the web site will try to submit with the space and fail.)

Just using the geocoder from a console will also show the error. So its not the website code. The following was run in Chrome console on the maps demo page (http://gmaps-samples-v3.googlecode.com/svn/trunk/draggable-directions/draggable-directions.html)

var geocoder = new google.maps.Geocoder();
undefined
geocoder.geocode({ 'address': 'Austin, TX', region: 'us' }, function(l,s){console.log(s); console.log(l);});
undefined
ZERO_RESULTS
geocoder.geocode({ 'address': 'Austin,TX', region: 'us' }, function(l,s){console.log(s); console.log(l);});
undefined
OK
Reply all
Reply to author
Forward
0 new messages