地理编码模块打开街道地图 但它似乎正在返回一个垃圾值
下面的是网址及其请求和响应标头
url参数
{"host":"nominatim.openstreetmap.org","path":"/search?format=json&addressdetails=1&q=adyar"}
响应标题
{"date":"Fri, 20 Jun 2014 06:48:57 GMT","server":"Apache/2.2.22 (Ubuntu)","content-location":"reverse.php","vary":"negotiate,accept","tcn":"choice","x-powered-by":"PHP/5.3.10-1ubuntu3.11","access-control-allow-methods":"OPTIONS,GET","access-control-max-age":"8640000","access-control-allow-origin":"*","connection":"close","transfer-encoding":"chunked","content-type":"application/json; charset=UTF-8"}
以下是我收到的回复
[ { latitude: '25.0706658',
longitude: '34.2062962',
country: 'Ù
صر (Egypt)',
city: undefined,
zipcode: undefined,
streetName: '212',
streetNumber: undefined,
countryCode: 'eg',
state: 'اÙ
بØر اÙ
Ø£ØÙ
Ù
ر',
stateCode: undefined } ]
我正在接收上面的垃圾值,不知道我哪里出错了。非常感谢任何帮助
答案 0 :(得分:0)
这不是垃圾,你只需要正确解码它。