I am developing an app which requires JSON. I use the link https://maps.googleapis.com/maps/api/place/autocomplete/json?input=+place+&types=geocode&sensor=true&key=AIzaSyCA4LKD6QfiCrGhZjCsYiRyEGqxKOUEQBU, where place is variable where the predictions are updated for. The problem is it does not take space but works fine in the browser and not in my app. Please give me the format of how variable place should be written or how browser modifies the space given
Asked
Active
Viewed 233 times
1 Answers
1
Replace all spaces with "%20" and than make an API call.
something like
place.replaceAll(" ","%20");
Happy Coding!
Krio

TeaCupApp
- 11,316
- 18
- 70
- 150
-
No worries Srikanth make sure to appreciate by an up vote too! :) – TeaCupApp Aug 09 '11 at 05:46