2014-11-19 3 views

답변

5

Google Street View Image API을 사용하여 스트리트 뷰 이미지를로드 할 수 있습니다.

이미지 요청 URL에 위치 및 이미지 크기 등을 지정할 수 있습니다.

Picasso.with(this).load(imageURL).into(imageView); 

또는 구글의 발리 라이브러리 사용 :

private static String imageURL = "https://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,-73.988354&fov=90&heading=235&pitch=10"; 

이미지를 요청하는 경우, 당신은 광장의 피카소 라이브러리를 사용할 수 있습니다

// Get the ImageLoader through your singleton class. 
mImageLoader = MySingleton.getInstance(this).getImageLoader(); 
mImageLoader.get(imageURL, ImageLoader.getImageListener(mImageView, 
     R.drawable.def_image, R.drawable.err_image)); 

또는 스트림과 비트 맵을 사용

Bitmap bitmap = BitmapFactory.decodeStream((InputStream)new URL(imageUrl).getContent()); 
imageView.setImageBitmap(bitmap); 

당신은 할 수 있습니다. o XML로 스트리트 뷰 이미지를 얻는 방법에 대해 this answer을 확인하십시오.

+0

@ just8laze이 문제가 해결 되었습니까? – ztan