Wednesday, December 22, 2010

How to properly pass address to google geocoding service

Programmer Question

I'm getting some problems trying Google Geocoding service when using special characters like "�" or letters with accents.



Whenever I try something like:
"barcelona, n� 10"



I get 0 results. But trying:
"barcelona n 10"



I get results...



I suspect is something related with encoding.
I tried this:



geocoder.geocode({'address': encodeURI( $('#direction').val() )}, function(){} );


But didn't help.



Any Idea?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails