No image displaying
gndumbri opened this issue · 1 comments
gndumbri commented
Hello,
When I run the code:
params = [{
'size': '600x300',
'location': '35.124762,-89.990795',
'heading': '151.78',
'pitch': '-0.76',
'key': 'KEY NOT SHARED HERE'
}]
results = google_streetview.api.results(params)
results.preview()
It does not display an image. I am running this code in Google Colab. Here is what I get instead:
[0] DcLKdIVOjVWy1jDDui2kDA
===========================
date: 2019-06
location:
lat: 35.12474824026881
lng: -89.99079815233901
pano_id: DcLKdIVOjVWy1jDDui2kDA
status: OK
How do I get the image from google street view to appear?
rrwen commented
Hi @gndumbri
The code results.preview()
is for previewing the API search results and does not actually download the images. This is good for checking if your code is working.
To download the actual images, use:
# Download images to directory 'downloads'
results.download_links('downloads')
More information here.
After you download the images to the downloads
folder, you can then load and display them in your notebook:
from IPython.display import Image
# Replace <PATH> with path to your downloaded streetview image
Image(filename='<PATH>/streetview_image.png')