In your example, your destination LatLng is in the middle of a vacant
lot. (I'm not sure where your LatLng came from, but you can try
dropping a Marker there to see.) It looks like the directions service
is trying to find the nearest "real" address, which looks to be the
office building labelled "Bunzl Verpakkingen Arnhem BV." And that is
where it ends up.
In maps.google, it looks like it is accepting the parking lot (car
park) at the end of Delta (Street) as an acceptable destination.
(This is not too surprising; the geoCoding API in maps.google is
different from the API because the API looks only for addresses,
whereas maps.google includes a Places function as well, so the results
are often different.)
If you assure your destinations are real places, you will probably get
more consistent results between the API and maps.google.com.
- Jeff
On Dec 1, 4:14 am, Alexander <alexander.kersten.1...@gmail.com> wrote:
> Hi all,
>
> I will summarize what the problem is. I have to draw TWO different routes
> in the same map. This is afaik only possible by using the Google Maps API.
> But using that gives me less accurate positions. When I draw the route
> directly in maps.google.com by filling the querystring it will give me the
> exact positions.
>
> For example:http://maps.google.com/maps?saddr=51.979362,5.980457&daddr=51.979402,...http://www.stuurhut.nl/google/map.html?origin=51.979362,5.980457&dest...
You might try parsing your text lat/lon strings and create a LatLon
object, which you can pass to Directions instead of strings.
http://code.google.com/apis/maps/documentation/javascript/services.html#DirectionsRequests
I do not know, but suspect, that would avoid the service trying to
second guess where you meant.