Re: [Google Maps API v2] # symbol / hashtag in Address generates a 400 error "Your client has issued a malformed or illegal request."
On 7 May 2012 22:42, Romulo Aguilar <romuloa@google.com> wrote:
> We generate maps using the static maps api v2 in emails since we are unable
> to use javascript in emails. Our data comes from CLU, and addresses that
> have a "#" in their address yield 400 errors and in turn give broken links
> to images in our emails. Is there a fix to this issue without having to
> manually change the data?
As you are from Google, I'm a little surprised you don't just ask the
Maps team directly.
The documentation
https://developers.google.com/maps/documentation/staticmaps/#Addresses
says that addresses must be url-encoded, so simply including a # as-is
will cause problems. Encoding it *might* work -- that is, it may not
yield a 400 error -- but it might not produce the correct result
because the geocoder doesn't understand it.
The geocoder API (which is used by the Static Maps API to find the
right location) can only handle premises addresses. If a postal
address includes a suite number within a particular block, it is very
likely to get confused.
Better not to use that field at all. Just use the street address. If
the street address includes a # (for a highway number, perhaps) then
omit it, because the geocoder won't cope with that.
PS Barry: Static Maps can be used in emails provided that there is a
link to Google Maps as well. See Terms 10.1.1(h)(ii).
--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home