Skip to content

Commit

Permalink
Add ' to geographic location query
Browse files Browse the repository at this point in the history
  • Loading branch information
survivingwithandroid committed Apr 9, 2014
1 parent 9904a8e commit 0a48041
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public String getQueryCityURL(String cityNamePattern) throws ApiKeyRequiredExcep

// We remove spaces in cityName
cityNamePattern = cityNamePattern.replaceAll(" ", "%20");
return YAHOO_GEO_URL + "/places.q(" + cityNamePattern + "%2A);count=" + config.maxResult + "?appid=" + config.ApiKey;
return YAHOO_GEO_URL + "/places.q('" + cityNamePattern + "%2A');count=" + config.maxResult + "?appid=" + config.ApiKey;
}

@Override
Expand All @@ -276,7 +276,7 @@ public String getQueryCityURLByLocation(Location location) throws ApiKeyRequired
if (config.ApiKey == null)
throw new ApiKeyRequiredException();

return YAHOO_GEO_URL + "/places.q(" + location.getLatitude() + "," + location.getLongitude() + ")?appid=" + config.ApiKey;
return YAHOO_GEO_URL + "/places.q('" + location.getLatitude() + "," + location.getLongitude() + "')?appid=" + config.ApiKey;
}

@Override
Expand Down

0 comments on commit 0a48041

Please sign in to comment.