Why does this legitimate address fail directions request but work when just mapped?

1,374 views
Skip to first unread message

kghastie

unread,
Jan 28, 2011, 2:34:26 PM1/28/11
to Google Maps JavaScript API v3
Here is the offending address: 633 Clark St, Evanston, IL 60208

This maps correctly on maps.google.com, but when I try it in a
directions request, the whole request fails (ZERO_RESULTS). Any ideas
on why or what I can do short of validating each address in a route in
a separate map call ahead of time?

Thanks!

(Also, any idea if there is a way to get a more detailed response on
what happened besides ZERO_RESULTS?

Andrew Leach

unread,
Jan 28, 2011, 2:47:24 PM1/28/11
to google-map...@googlegroups.com
On 28 January 2011 19:34, kghastie <kevin....@gmail.com> wrote:
> Here is the offending address: 633 Clark St, Evanston, IL 60208
>
> This maps correctly on maps.google.com, but when I try it in a
> directions request, the whole request fails (ZERO_RESULTS).  Any ideas
> on why or what I can do short of validating each address in a route in
> a separate map call ahead of time?

ZERO_RESULTS means no route could be found between your two points. If
an address cannot be geocoded, you get NOT_FOUND.

In fact that address geocodes fine. Try here:
http://code.google.com/apis/maps/documentation/javascript/examples/geocoding-simple.html

Bear in mind, too, that the geocoders in the API and maps.google.com
are different. There's no guarantee that what works in one will work
in the other, and in particular maps.google.com should not be used to
confirm results from the API.

kghastie

unread,
Jan 28, 2011, 4:27:56 PM1/28/11
to Google Maps JavaScript API v3
Right, but I'm confused by the fact that it can geocode to the proper
point on the map but not find a route to anywhere else. Here is one
example of an address it can't reach, even though it's right up the
street:

1703 Orrington Avenue, Evanston, IL

Why can't it find a route for these two locations? These are majors
streets.

On Jan 28, 1:47 pm, Andrew Leach <andrew.leac...@gmail.com> wrote:
> On 28 January 2011 19:34, kghastie <kevin.has...@gmail.com> wrote:
>
> > Here is the offending address: 633 Clark St, Evanston, IL 60208
>
> > This maps correctly on maps.google.com, but when I try it in a
> > directions request, the whole request fails (ZERO_RESULTS).  Any ideas
> > on why or what I can do short of validating each address in a route in
> > a separate map call ahead of time?
>
> ZERO_RESULTS means no route could be found between your two points. If
> an address cannot be geocoded, you get NOT_FOUND.
>
> In fact that address geocodes fine. Try here:http://code.google.com/apis/maps/documentation/javascript/examples/ge...

Andrew Leach

unread,
Jan 28, 2011, 5:06:35 PM1/28/11
to google-map...@googlegroups.com
On 28 January 2011 21:27, kghastie <kevin....@gmail.com> wrote:
> 633 Clark St, Evanston, IL 60208
> 1703 Orrington Avenue, Evanston, IL

Larry's page at
http://www.geocodezip.com/v3_GoogleEx_directions-draggableA.html
manages that (hardcode the addresses in a local copy). The route goes
round the block with the one-way system.

So something else must be wrong. Time for a link, I think.

geoco...@gmail.com

unread,
Jan 28, 2011, 6:21:48 PM1/28/11
to Google Maps JavaScript API v3
On Jan 28, 2:06 pm, Andrew Leach <andrew.leac...@gmail.com> wrote:
> On 28 January 2011 21:27, kghastie <kevin.has...@gmail.com> wrote:
>
> > 633 Clark St, Evanston, IL 60208
> > 1703 Orrington Avenue, Evanston, IL
>
> Larry's page athttp://www.geocodezip.com/v3_GoogleEx_directions-draggableA.html
> manages that (hardcode the addresses in a local copy). The route goes
> round the block with the one-way system.

But v2 (assuming the same routing engine) driving directions doesn't
work, but walking directions does:
http://www.geocodezip.com/example_geo2.asp?addr1=633%20Clark%20St,%20Evanston,%20IL%2060208%20&addr2=1703%20Orrington%20Avenue,%20Evanston,%20IL%20&geocode=1&geocode=2&walking=yes

(also driving directions using the address works, it only fails when
the directions are from geocoded points).

-- Larry

kghastie

unread,
Jan 28, 2011, 10:41:00 PM1/28/11
to google-map...@googlegroups.com
Unfortunately I don't have a link yet, as the project is still in development and is only available on our vpn.  The code I  am using though basically just uses the example code from the Google Maps docs, nothing special..

geoco...@gmail.com

unread,
Jan 29, 2011, 2:24:44 AM1/29/11
to Google Maps JavaScript API v3
Then it should be easy to post a link to an example map that exhibits
the problem...

-- Larry
Reply all
Reply to author
Forward
0 new messages