views:

173

answers:

1

See my test page.

When on the page, click the top left button "Geocode". If you are in Firefox, geocoder.geocode() will have it's status equal to ERROR (and pop an alert after a few seconds). In Internet Explorer (at least 7), everything is fine and the marker is added to the map.

If you remove the quote from the address (l'Assomption --> lAssomption), everything execute fine in Firefox.

Now with my question: how a quote can "crash" the Google Maps V3 API only in Firefox!?

UPDATE: Status of my report has beed changed to "Confirmed" by Google. It seems it's really a V3 bug. While it's fixed, I remove quotes from the address before geocoding (Google Maps is smart enough to find it without it).

+1  A: 

That's weird. When I try it in Firefox the response code from the server is 403. Here's test link to the API call as reported in Firebug

5415 boul. de l'Assomption, Montreal, Quebec, H1T2M4, Canada

So, then I loaded it up in IE and fired up Charles. Here's the link to the API call generated by IE.

5415 boul. de l'Assomption, Montreal, Quebec, H1T2M4, Canada

See the difference? Firefox is encoding the ' into %27 whereas IE is not.

Conclusions

  1. Either a native function or a difference in browser handling by the Google API, Firefox and IE handle the escaping of the apostrophe in URLs differently.
  2. Google's geocode service endpoint doesn't know how to handle a URL-encoded apostrophe, and throws a 403 - Forbidden as a false negative.

Long story short? Seems like a bug.

Peter Bailey
Filled a bug report at http://code.google.com/p/gmaps-api-issues/issues/detail?id=2348 we will see what they says...
AlexV