Maps returns no result, a route ends in the middle of the sea or the house number is missing? There's almost always one of a few typical causes behind it. Here they are, with the fix for each.
The route ends up in the sea, in Africa or in the wrong place
This almost always happens because longitude and latitude are swapped. In Maps, origin, destination, waypoints and proximity always use the order longitude,latitude. For Berlin that means 13.4050,52.5200, not 52.5200,13.4050.
The tricky part is that for many places, the swapped values are still valid coordinates. Instead of an error, you get a result somewhere else in the world, or a 404 because there's no road there.
Here's which name applies where:
| Where | Format |
|---|---|
Maps routes and proximity |
one value longitude,latitude |
| Maps geocoding | two parameters lat and lng |
| Maps responses | fields lat and lng |
| IP Geolocation | fields lat and lon |
If you take coordinates from IP Geolocation, longitude is called lon there. In Maps, pass that value as lng or in first position.
HTTP 422: Invalid parameters
A parameter is missing or has an invalid value. details always names the affected field with a message, for example:
{"success":false,"error":"Invalid parameters","details":{"country":["..."]}}
The message text itself is in German at the moment. Common causes:
- The search term
qis missing or longer than 256 characters. countryisn't exactly two letters.DEis correct, notDEUorGermany.limitisn't between 1 and 10.- In geocoding,
addressis missing, or onlylatis set withoutlng. - In routing,
originordestinationis missing,profileisn't a known value, oralternativesistrueinstead of1.
HTTP 404: nothing found
Maps couldn't determine an address or route. The text in error tells you which endpoint is affected:
No address data found for this address: geocoding found nothing for the address. Check the spelling, postal code andcountry.No address found for the specified coordinates: there's no known address at that point, often because the coordinates are swapped.No route found for the specified coordinates: there's no route between the points for the chosen means of transport, or a value inavoidis invalid.
The place search, on the other hand, never answers with 404. If it finds nothing, the addresses list is simply empty. Like all errors, these responses aren't billed.
In the area's Log you can see every failed request with its Parameters and Error response. Set the filter to Failed and click the eye icon on the entry.
House numbers are missing from the results
The place search also returns streets, postal codes and places. Results without a house number always come after complete addresses. If the house number is missing everywhere, Maps doesn't know it for that street or your search term doesn't include one. Include the house number, or restrict the search to addresses with types=address.
Results in the wrong country
Without country, Maps searches worldwide. There's a "Main Street 5" in many countries. Set country=DE or the right country, and add proximity for results near a particular place.
HTTP 500: server error
A server error can have two reasons:
- The coordinates of a route are badly formatted, for example with a space instead of a comma, with three values or with values outside the valid range. The response is then
{"message":"Server Error"}. Check the format first. An unknown value intypescan also lead to a server error. - The map service was unavailable at that moment. Wait a little and try again.
May I store the results?
No, not for later use. The notice in the attribution field of every successful response says the response and its data must not be stored permanently. Use the results directly, for example for display or for selecting an address, and request them again when needed.
Good to know
The basics of the three endpoints are here: