1

We would like to draw a route between two points by using Google Maps Directions API.

Request:

https://maps.googleapis.com/maps/api/directions/json?origin=39.76700140,30.50334660&destination=39.49402464,31.84024373

Response:

{
   "geocoded_waypoints" : [ {}, {} ],
   "routes" : [],
   "status" : "ZERO_RESULTS"
}

It returns ZERO_RESULTS status. However, these two points can be geocoded and they are actual and valid points.

Does anyone know why the route can not be drawn although they can be geocoded?

Thanks in advance, Mark

Mark Karan
  • 169
  • 2
  • 4
  • 16
  • 1
    Looks like 39.49402464,31.84024373 isn't near any roads (where did that point come from? Why are you trying to use it for driving directions?). When you geocode it, you probably get the "nearest known point", which may or may not be closer to a road. The directions service can't route to places that aren't near enough to a road. – geocodezip Jun 21 '18 at 06:33

1 Answers1

1

I found the reason for it. Google routes to points which are close to the roads at least 5 KMs.

That point is in rural area and not close to any roads at least 5 KMs. For that reason, it gives the error called ZERO_RESULTS.

Thanks,

Mark

Mark Karan
  • 169
  • 2
  • 4
  • 16