1

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

SKB
  • 137
  • 2
  • 11

1 Answers1

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