Currently, I am attempting to extract the longitude and latitude of a user in order to utilize it in a Yahoo API query for obtaining the WOEID based on these coordinates. Subsequently, the WOEID will be passed through to a weather API call.
My current predicament lies in cases where negative longitudes are returned, such as -0.127683. The issue arises in the following URL request:
http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.placefinder%20where%20text%3D%22"+lat+"%2C"+long+"%22&format=json&callback=
The problem is that the 'long' value includes the negative sign, which is not in the ASCII format required for the URL request.
(The 'long' and 'lat' variables referenced in the URL above have been retrieved from another AJAX call.)
Are there any potential solutions or workarounds available?