Identify successful GET that returns a map but the location parameters are not found

3 posts / 0 new
Last post
mikeymanoguerra
Identify successful GET that returns a map but the location parameters are not found

if i make a request with non-alphabet characters (such as '#%@#%#$%^#@') i recieve a 400 bad request back

However, if i make a request of nonsense alphabet characters (such as 'gdagrhraehre' or 'ffffffffffffffffffff'), I will get a 200 OK response, but the image returned is a map centered over the continental US. 

Is there a way to identify the later case, so i can handle this geographically incorrect 200 response on the client end?

This situation arises when users input incorrect info.

 

Thanks!

 

Mikey


MQBrianCoakley
The non-alphabetic characters
The non-alphabetic characters contain reserved characters and will break url conventions and break the request returning an http 400 error. If the location is garbage data then the geocoder defaults to the center of the default country which is the US. You can check the validity of the address by geocoding the address first, checking the quality code, then using the resulting lat,lng in the map request.

mikeymanoguerra
Thanks! it was a poor example

Thanks! it was a poor example to add % as a character in my failure req.
I will take your suggestion, and add better validation in my end as well.