How to properly pass address to google geocoding service

Posted by clinisbut on Stack Overflow See other posts from Stack Overflow or by clinisbut
Published on 2010-12-22T20:35:32Z Indexed on 2010/12/22 20:54 UTC
Read the original article Hit count: 229

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?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about google-maps-api-3