Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/223.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 从GooglePlacesAPI检索图像_Android_Google Places Api - Fatal编程技术网

Android 从GooglePlacesAPI检索图像

Android 从GooglePlacesAPI检索图像,android,google-places-api,Android,Google Places Api,我正在使用Google Places api获取位置数据: https://maps.googleapis.com/maps/api/place/search/json? + "location=" + strlatitude + "," + strlongitude + "&" +"radius=" + searchRadius + "&" +"types="+ types + "&" + "sensor=true" + "&" + "key=" + googl

我正在使用Google Places api获取位置数据:

https://maps.googleapis.com/maps/api/place/search/json? + "location=" + strlatitude + "," + strlongitude + "&" +"radius=" + searchRadius + "&" +"types="+ types + "&" + "sensor=true" + "&" + "key=" + googleAPIKey;
我只是从这个回复中得到了唯一的“图标”,但我想得到那个地方的图片

是否有任何参数可以获取这些地方的图像


此外,我如何获得这些地方的评论(如9reviews、6reviews等)

您可以使用
JSONObject
获得
image\u链接,并且您可以使用
Bitmap
轻松地将特定链接转换为图像

例如,从
Json
获取
image\u链接

JSONObject jsonObj = new JSONObject(Global.JSON.toString()); 

// Creating JSON Parser instance
JSONArray jr=jsonObj.getJSONArray("results");

for(int h=0;h<jr.length();h++)
{       
    JSONObject js=jr.getJSONObject(h);      
    icon_array=js.getString("icon");    
}

我找到了从places Api获取位置图像的链接

尝试此链接

在上面的链接中,您会看到这样的图像

参考链接

我获得了“图标”,但我如何才能获得特定的图像place@David,你能回答这个问题吗?我不知道位置图片。谷歌只在他们的Json中提供图标图片。没关系,那么评论的概念呢
url = new URL("http://www.paho.org/Images/DD/PIN/whd08_banner2_eng.jpg");
//In URL pass your link

bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
image_view.setImageBitmap(bm);