shukerullah / react-geocode

A React module to transform a description of a location (i.e. street address, town name, etc.) into geographic coordinates (i.e. latitude and longitude) and vice versa.
MIT License
207 stars 33 forks source link

fromAddress doesn't work if address contains some special characters #20

Closed alexandrugheorghiu closed 4 years ago

alexandrugheorghiu commented 5 years ago

For an address that contains the special characters that the encodeURI() doesn't encode (i.e., , / ? : @ & = + $ #), e.g., 21 146TH AVE SE #3, BELLEVUE, WA 98007, the fromAddress() doesn't return any results.

Possible fix: replace encodeURI() with encodeURIComponent().

shukerullah commented 4 years ago

It's fixes now, thank you.